Skip to content

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

lcnr and 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 <[email protected]>
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.
spastorino and others added 16 commits October 27, 2020 14:45
… r=oli-obk

Separate unsized locals

Closes rust-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`, fix rust-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

Fixes rust-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`

Fixes rust-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
Author

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 28, 2020

📌 Commit 6967005 has been approved by Dylan-DPC

@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 Oct 28, 2020
@Dylan-DPC-zz
Copy link
Author

@bors rollup=never p=5

@bors
Copy link
Collaborator

bors commented Oct 28, 2020

⌛ Testing commit 6967005 with merge db241bb...

@bors
Copy link
Collaborator

bors commented Oct 28, 2020

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

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. 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.