We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f08b3a commit 313dff1Copy full SHA for 313dff1
tests/ui/lifetimes/elided-lifetime-in-const-param-type.rs
@@ -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