Uh oh!
There was an error while loading. Please reload this page.
Rollup of 10 pull requests - #78458
Merged
Merged
Conversation
* Recover empty `fn` bodies when encountering `}` * Recover trailing `>` in return types * Recover from non-type in array type `[<BAD TOKEN>; LEN]`
…ner; we no longer need the ignore_interior_mut_in_const hack
This commit improves the diagnostic emitted when a tuple struct is being constructed which has private fields so that private fields are labelled and the message is improved. Signed-off-by: David Wood <david@davidtw.co>
When encountering a failing method or field resolution on a `Future`, look at the `Output` and try the same operation on it. If successful, suggest calling `.await` on the `Future`. This had already been introduced in rust-lang#72784, but at some point they stopped working.
Fixesrust-lang#78398 I forgot to handle this case in rust-lang#77255
… r=oli-obk Separate unsized locals Closesrust-lang#71694 Takes over again rust-lang#72029 and rust-lang#74971 cc @RalfJung@oli-obk@pnkfelix@eddyb as they've participated in previous reviews of this PR.
Suggest calling await on method call and field access When encountering a failing method or field resolution on a `Future`, look at the `Output` and try the same operation on it. If successful, suggest calling `.await` on the `Future`. This had already been introduced in rust-lang#72784, but at some point they stopped working. Built on top of rust-lang#78214, only last commit is relevant. r? @oli-obk
…i-obk Move "mutable thing in const" check from interning to validity This moves the check for mutable things (such as `UnsafeCell` or `&mut`) in a`const` from interning to validity. That means we can give more targeted error messages (pointing out *where* the problem lies), and we can simplify interning a bit. Also fix the interning mode used for promoteds in statics. r? @oli-obk
check object safety of generic constants As `Self` can only be effectively used in constants with `const_evaluatable_checked` this should not matter outside of it. Implements the first item of rust-lang#72219 > Object safety interactions with constants r? @oli-obk for now cc @nikomatsakis
Tweak invalid `fn` header and body parsing * Rely on regular "expected"/"found" parser error for `fn`, fixrust-lang#77115 * Recover empty `fn` bodies when encountering `}` * Recover trailing `>` in return types * Recover from non-type in array type `[<BAD TOKEN>; LEN]`
Add const_fn in generics test Adds a test that constant functions in generic parameters work properly. I was surprised this works, but I also to turbofish the constant in main, otherwise it didn't infer properly: ``` let v: ConstU32<3> = ... ``` Did not work as I expected, which I can highlight in the test if that's the intended behaviour. r? @lcnr
…ct-private-field, r=estebank resolve: private fields in tuple struct ctor diag Fixesrust-lang#75906. This PR improves the diagnostic emitted when a tuple struct is being constructed which has private fields so that private fields are labelled and the message is improved. r? @estebank
…, r=oli-obk Remove tokens from foreign items in `TokenStripper` Fixesrust-lang#78398 I forgot to handle this case in rust-lang#77255
Fix typo in comment I hope I got all the typos in that word. :)
Fix typo in comments
Dylan-DPC-zz
commented
Oct 28, 2020
Author
@bors r+ rollup |
bors
commented
Oct 28, 2020
Collaborator
📌 Commit 6967005 has been approved by |
Dylan-DPC-zz
commented
Oct 28, 2020
Author
@bors rollup=never p=5 |
bors
commented
Oct 28, 2020
Collaborator
bors
commented
Oct 28, 2020
Collaborator
☀️ Test successful - checks-actions |
This was referenced Oct 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
fnheader and body parsing #78379 (Tweak invalidfnheader and body parsing)TokenStripper#78408 (Remove tokens from foreign items inTokenStripper)Failed merges:
r? @ghost