-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #61198
Rollup of 9 pull requests #61198
Conversation
We are going to uniform the terminology of all associated items. Methods that may or may not have `self` are called "associated functions". Because `AssociatedFn` is a bit long, we rename `Associated` to `Assoc`.
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`.
Rename "Associated*" to "Assoc*" This change is for rust-lang#60163. r? @oli-obk
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.
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 c2877ca has been approved by |
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 |
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