Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #61201

Merged
merged 21 commits into from
May 26, 2019
Merged

Rollup of 9 pull requests #61201

merged 21 commits into from
May 26, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented May 26, 2019

Successful merges:

Failed merges:

r? @ghost

estebank and others added 21 commits May 24, 2019 18:23
This makes it easier to figure out when const propagation fails.
Mention that `self` is only valid on "associated functions"
```
error: unexpected `self` argument in function
  --> $DIR/self-in-function-arg.rs:1:15
   |
LL | fn foo(x:i32, self: i32) -> i32 { self }
   |               ^^^^ not valid as function argument
   |
   = note: `self` is only valid as the first argument of an associated function
```

When it is a method, mention it must be first
```
error: unexpected `self` argument in function
  --> $DIR/trait-fn.rs:4:20
   |
LL |     fn c(foo: u32, self) {}
   |                    ^^^^ must be the first associated function argument
```
Move a bunch of error recovery methods to `diagnostics.rs` away from
`parser.rs`.
Tweak `self` arg not as first argument of a method diagnostic

Mention that `self` is only valid on "associated functions"
```
error: unexpected `self` argument in function
  --> $DIR/self-in-function-arg.rs:1:15
   |
LL | fn foo(x:i32, self: i32) -> i32 { self }
   |               ^^^^ not valid as function argument
   |
   = note: `self` is only valid as the first argument of an associated function
```

When it is a method, mention it must be first
```
error: unexpected `self` argument in function
  --> $DIR/trait-fn.rs:4:20
   |
LL |     fn c(foo: u32, self) {}
   |                    ^^^^ must be the first associated function argument
```

Move a bunch of error recovery methods to `diagnostics.rs` away from `parser.rs`.

Fix rust-lang#51547. CC rust-lang#60015.
Vec: avoid creating slices to the elements

Instead of `self.deref_mut().as_mut_ptr()` to get a raw pointer to the buffer, use `self.buf.ptr_mut()`. This (a) avoids creating a unique reference to all existing elements without any need, and (b) creates a pointer that can actually be used for the *entire* buffer, and not just for the part of it covered by `self.deref_mut()`.

I also got worried about `RawVec::ptr` returning a `*mut T` from an `&self`, so I added both a mutable and an immutable version.

Cc @gankro in particular for the `assume` changes -- I don't know why that is not in `Unique`, but I moved it up from `Vec::deref` to `RawVec::ptr` to avoid having to repeat it everywhere.

Fixes rust-lang#60847
MaybeUninit doctest: remove unnecessary type ascription
Auto-derive Encode and Decode implementations of DefPathTable

See rust-lang#60647 (comment)
…li-obk

Add additional trace statements to the const propagator

This makes it easier to figure out when const propagation fails.
Turn turbo 🐟 🍨 into an error

Master branch part of rust-lang#60989

r? @varkor
@Centril
Copy link
Contributor Author

Centril commented May 26, 2019

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented May 26, 2019

📌 Commit 8d247e7 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 26, 2019
@bors
Copy link
Contributor

bors commented May 26, 2019

⌛ Testing commit 8d247e7 with merge 84f30ac97020f010e5fc6ad0ebf98592a3b24a12...

@bors
Copy link
Contributor

bors commented May 26, 2019

💔 Test failed - checks-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 26, 2019
@rust-highfive
Copy link
Collaborator

The job arm-android of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:52:03] test string::test_str_truncate_invalid_len ... ok
[01:52:03] test string::test_str_truncate_split_codepoint ... ok
[01:52:03] test string::test_str_truncate ... ok
[01:52:04] error: test failed, to rerun pass '--test collectionstests'
[01:52:04] died due to signal 11
[01:52:04] 
[01:52:04] 
[01:52:04] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "arm-linux-androideabi" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "alloc" "--"
[01:52:04] 
[01:52:04] 
[01:52:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-linux-androideabi
[01:52:04] Build completed unsuccessfully in 1:40:58
---
travis_time:end:116711f2:start=1558841098755959057,finish=1558841098771058312,duration=15099255
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2e604440
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1ad67710
travis_time:start:1ad67710
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:13261b89
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril
Copy link
Contributor Author

Centril commented May 26, 2019

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 26, 2019
@bors
Copy link
Contributor

bors commented May 26, 2019

⌛ Testing commit 8d247e7 with merge 2268d99...

bors added a commit that referenced this pull request May 26, 2019
Rollup of 9 pull requests

Successful merges:

 - #61087 (Tweak `self` arg not as first argument of a method diagnostic)
 - #61114 (Vec: avoid creating slices to the elements)
 - #61144 (Suggest borrowing for loop head on move error)
 - #61149 (Fix spelling in release notes)
 - #61161 (MaybeUninit doctest: remove unnecessary type ascription)
 - #61173 (Auto-derive Encode and Decode implementations of DefPathTable)
 - #61184 (Add additional trace statements to the const propagator)
 - #61189 (Turn turbo 🐟 🍨 into an error)
 - #61193 (Add comment to explain why we change the layout for Projection)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented May 26, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing 2268d99 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 26, 2019
@bors bors merged commit 8d247e7 into rust-lang:master May 26, 2019
@Centril Centril deleted the rollup-975knrk branch May 26, 2019 11:16
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants