-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix async fn lowering ICE with APIT.
This commit fixes an ICE where simple bindings (which aren't replaced with replacement arguments during async fn lowering) were not being visited in the def collector and thus caused an ICE during HIR lowering for types that use their `DefId` at that point - such as `impl Trait`.
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// compile-pass | ||
// edition:2018 | ||
|
||
#![feature(async_await)] | ||
|
||
// This is a regression test to ensure that simple bindings (where replacement arguments aren't | ||
// created during async fn lowering) that have their DefId used during HIR lowering (such as impl | ||
// trait) are visited during def collection and thus have a DefId. | ||
|
||
async fn foo(ws: impl Iterator<Item = ()>) {} | ||
|
||
fn main() {} |