use ParamName to track in-scope lifetimes instead of Ident#63501
use ParamName to track in-scope lifetimes instead of Ident#63501bors merged 4 commits intorust-lang:masterfrom
ParamName to track in-scope lifetimes instead of Ident#63501Conversation
This allows us to record "fresh" lifetime names for cases like `impl Foo<'_>`.
|
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 |
| } | ||
|
|
||
| if self.in_scope_lifetimes.contains(&ident.modern()) { | ||
| if self.in_scope_lifetimes.contains(&ParamName::Plain(ident.modern())) { |
There was a problem hiding this comment.
I don't think this check is correct anymore-- it's failing when it should succeed, causing lifetimes to be introduced multiple times (see the travis error). It should instead check if there is an in scope lifetime that uses the same identifier, right?
There was a problem hiding this comment.
Hmm. Is it the ident.modern() that's causing the problem, you think?
There was a problem hiding this comment.
I think I have a fix now
|
@bors r+ |
|
📌 Commit a02a171 has been approved by |
This was causing us to incorrectly think the lifetimes were already declared on the scope for the nested item, when in fact they are not inherited.
|
@bors r+ |
|
📌 Commit e4756e6 has been approved by |
|
@bors p=17 |
…-impl-lifetime, r=cramertj use `ParamName` to track in-scope lifetimes instead of Ident Also, clear in-scope lifetimes when visiting nested items. Fixes rust-lang#63500. Fixes rust-lang#63225. Fixes rust-lang#52532. r? @cramertj
…-impl-lifetime, r=cramertj use `ParamName` to track in-scope lifetimes instead of Ident Also, clear in-scope lifetimes when visiting nested items. Fixes rust-lang#63500. Fixes rust-lang#63225. Fixes rust-lang#52532. r? @cramertj
Rollup of 17 pull requests Successful merges: - #62760 (Deduplicate error messages in `librsctc_mir`) - #62849 (typeck: Prohibit RPIT types that inherit lifetimes) - #63383 (`async fn` lifetime elision tests) - #63421 (Implement Clone, Display for ascii::EscapeDefault) - #63459 (syntax: account for CVarArgs being in the argument list.) - #63475 (Bring back suggestion for splitting `<-` into `< -`) - #63485 (ci: move mirrors to their standalone bucket) - #63486 (Document `From` trait for `BinaryHeap`) - #63488 (improve DiagnosticBuilder docs) - #63493 (Remove unneeded comment in src/libcore/hash/mod.rs) - #63499 (handle elision in async fn correctly) - #63501 (use `ParamName` to track in-scope lifetimes instead of Ident) - #63508 (Do not ICE when synthesizing spans falling inside unicode chars) - #63511 (ci: add a check for clock drift) - #63512 (Provide map_ok and map_err method for Poll<Option<Result<T, E>>>) - #63529 (RELEASES.md: ? is one of three Kleene operators) - #63530 (Fix typo in error message.) Failed merges: r? @ghost
Rollup of 17 pull requests Successful merges: - #62760 (Deduplicate error messages in `librsctc_mir`) - #62849 (typeck: Prohibit RPIT types that inherit lifetimes) - #63383 (`async fn` lifetime elision tests) - #63421 (Implement Clone, Display for ascii::EscapeDefault) - #63459 (syntax: account for CVarArgs being in the argument list.) - #63475 (Bring back suggestion for splitting `<-` into `< -`) - #63485 (ci: move mirrors to their standalone bucket) - #63486 (Document `From` trait for `BinaryHeap`) - #63488 (improve DiagnosticBuilder docs) - #63493 (Remove unneeded comment in src/libcore/hash/mod.rs) - #63499 (handle elision in async fn correctly) - #63501 (use `ParamName` to track in-scope lifetimes instead of Ident) - #63508 (Do not ICE when synthesizing spans falling inside unicode chars) - #63511 (ci: add a check for clock drift) - #63512 (Provide map_ok and map_err method for Poll<Option<Result<T, E>>>) - #63529 (RELEASES.md: ? is one of three Kleene operators) - #63530 (Fix typo in error message.) Failed merges: r? @ghost
|
☔ The latest upstream changes (presumably #63544) made this pull request unmergeable. Please resolve the merge conflicts. |
…amertj
Stabilize `async_await` in Rust 1.39.0
Here we stabilize:
- free and inherent `async fn`s,
- the `<expr>.await` expression form,
- and the `async move? { ... }` block form.
Closes rust-lang#62149.
Closes rust-lang#50547.
All the blockers are now closed.
<details>
- [x] FCP in rust-lang#62149
- [x] rust-lang#61949; PR in rust-lang#62849.
- [x] rust-lang#62517; PR in rust-lang#63376.
- [x] rust-lang#63225; PR in rust-lang#63501
- [x] rust-lang#63388; PR in rust-lang#63499
- [x] rust-lang#63500; PR in rust-lang#63501
- [x] rust-lang#62121 (comment)
- [x] Some tests for control flow (PR rust-lang#63387):
- `?`
- `return` in `async` blocks
- `break`
- [x] rust-lang#61775 (comment), i.e. tests for rust-lang#60944 with `async fn`s instead). PR in rust-lang#63383
</details>
r? @cramertj
Also, clear in-scope lifetimes when visiting nested items.
Fixes #63500.
Fixes #63225.
Fixes #52532.
r? @cramertj