-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 9 pull requests #61201
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rollup of 9 pull requests #61201
Conversation
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
Suggest borrowing for loop head on move error Fix rust-lang#61108.
Fix spelling in release notes
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
Add comment to explain why we change the layout for Projection r? @RalfJung Addresses the comment in https://github.com/rust-lang/rust/pull/61104/files#r287556257
@bors r+ p=9 rollup=never |
📌 Commit 8d247e7 has been approved by |
⌛ Testing commit 8d247e7 with merge 84f30ac97020f010e5fc6ad0ebf98592a3b24a12... |
💔 Test failed - checks-travis |
The job Click to expand the log.
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 |
@bors retry |
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
☀️ Test successful - checks-travis, status-appveyor |
Successful merges:
self
arg not as first argument of a method diagnostic #61087 (Tweakself
arg not as first argument of a method diagnostic)Failed merges:
r? @ghost