Skip to content

Rollup of 10 pull requests - #78458

Merged
bors merged 51 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-tan044s
Oct 28, 2020
Merged

Rollup of 10 pull requests#78458
bors merged 51 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-tan044s

Conversation

@Dylan-DPC-zz

Copy link
Copy Markdown

Successful merges:

Failed merges:

r? @ghost

lcnrand others added 30 commits October 25, 2020 18:05
* 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.
spastorinoand others added 16 commits October 27, 2020 14:45
… 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. :)
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors r+ rollup

@bors

bors commented Oct 28, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 6967005 has been approved by Dylan-DPC

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 28, 2020
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors rollup=never p=5

@bors

bors commented Oct 28, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 6967005 with merge db241bb...

@bors

bors commented Oct 28, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing db241bb to master...

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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.

13 participants

@Dylan-DPC-zz@bors@rustbot@lcnr@estebank@RalfJung@davidtwco@Aaron1011@bugadani@spastorino@JulianKnodt@Storyyeller@Dylan-DPC