Skip to content

Commit 313dff1

Browse files
committed
Add test.
1 parent 8f08b3a commit 313dff1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/143413>
2+
//! The anonymous lifetime in `c(&())` is desugared by the resolver as an extra lifetime parameter
3+
//! at the end of the `for` binder. Verify that lowering creates the definition for that extra
4+
//! lifetime parameter before lowering `c(&())`.
5+
6+
trait D {}
7+
8+
type A = dyn for<const B: c(&())> D;
9+
//~^ ERROR cannot find type `c` in this scope
10+
//~| ERROR only lifetime parameters can be used in this context
11+
12+
fn main() {}

0 commit comments

Comments
 (0)