8000 [beta] backport rollup by Mark-Simulacrum · Pull Request #65708 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

[beta] backport rollup #65708

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

Merged
merged 26 commits into from
Oct 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d45ca22
Add troubleshooting section to PGO chapter in rustc book.
michaelwoerister Oct 14, 2019
edcc7af
Auto merge of #65302 - msizanoen1:fix-armv7-segfault, r=alexcrichton
bors Oct 20, 2019
36ef9d7
Add expanded type cache to OpaqueTypeExpander
tmandry Oct 10, 2019
e9978cf
Only expand types that contain projections
tmandry Oct 10, 2019
cf05730
use precalculated dominators in explain_borrow
tanriol Oct 6, 2019
42c5024
Ensure that associated `async fn`s have unique fresh param names
matthewjasper Oct 5, 2019
2b88722
Account for macro invocation in `let mut $pat` diagnostic.
Centril Oct 5, 2019
8bf21c1
Auto merge of #65020 - pnkfelix:targetted-fix-for-always-marking-rust…
bors Oct 12, 2019
da27cc9
typeck: silence unreachable code from await
davidtwco Sep 30, 2019
3455abb
async/await: improve obligation errors
davidtwco Sep 25, 2019
22694dc
syntax: fix #64682.
Centril Sep 29, 2019
e31afd3
Upgrade async/await to "used" keywords.
ehuss Sep 28, 2019
db3b85c
Filter out stmts made for the redundant_semicolon lint when pretty-pr…
nathanwhit Sep 12, 2019
c2bf2ca
Add test for redundant_semicolon lint interaction with proc macro attrs
nathanwhit Sep 28, 2019
6031a8a
Fix async/await ICE #64964
sinkuu Oct 2, 2019
f7b45be
Do not collect to vec for debug output
sinkuu Oct 2, 2019
de58c33
Pacify tidy
Mark-Simulacrum Oct 24, 2019
336464a
workaround msys2 bug
mati865 Oct 24, 2019
ba9b8be
Revert "Auto merge of #62948 - matklad:failable-file-loading, r=petro…
matklad Oct 10, 2019
6bd9305
Use empty typeck tables when nesting on items without those
Xanewok Oct 4, 2019
f17c36e
Test an assoc. type in struct member def inside fn
Xanewok Oct 12, 2019
6b753f6
Nest typeck tables when processing struct member types
Xanewok Oct 12, 2019
b561cd1
save-analysis: Nest tables when processing impl items
Xanewok Oct 17, 2019
da12236
save-analysis: Add a relevant test case
Xanewok Oct 17, 2019
4377d2e
Avoid ICE when checking `Destination` of `break` inside a closure
estebank Oct 17, 2019
4aa1e7a
Avoid ICE when adjusting bad self ty
estebank Oct 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure that associated async fns have unique fresh param names
  • Loading branch information
matthewjasper authored and Mark-Simulacrum committed Oct 22, 2019
commit 42c50243ef81630d893b4e97e048c20af4bdbee6
2 changes: 1 addition & 1 deletion src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ impl<'a> LoweringContext<'a> {
/// header, we convert it to an in-band lifetime.
fn collect_fresh_in_band_lifetime(&mut self, span: Span) -> ParamName {
assert!(self.is_collecting_in_band_lifetimes);
let index = self.lifetimes_to_define.len();
let index = self.lifetimes_to_define.len() + self.in_scope_lifetimes.len();
let hir_name = ParamName::Fresh(index);
self.lifetimes_to_define.push((span, hir_name));
hir_name
Expand Down
23 changes: 23 additions & 0 deletions src/test/ui/async-await/async-assoc-fn-anon-lifetimes.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// check-pass
// Check that the anonymous lifetimes used here aren't considered to shadow one
// another. Note that `async fn` is different to `fn` here because the lifetimes
// are numbered by HIR lowering, rather than lifetime resolution.

// edition:2018

struct A<'a, 'b>(&'a &'b i32);
struct B<'a>(&'a i32);

impl A<'_, '_> {
async fn assoc(x: &u32, y: B<'_>) {
4E2D async fn nested(x: &u32, y: A<'_, '_>) {}
}

async fn assoc2(x: &u32, y: A<'_, '_>) {
impl A<'_, '_> {
async fn nested_assoc(x: &u32, y: B<'_>) {}
}
}
}

fn main() {}
0