We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f253201 commit b182a21Copy full SHA for b182a21
src/test/ui/issue-54943.rs
@@ -0,0 +1,7 @@
1
+fn foo<T: 'static>() { }
2
+
3
+fn main<'a>() {
4
+ return;
5
6
+ let x = foo::<&'a u32>();
7
+}
src/test/ui/issue-54943.stderr
@@ -0,0 +1,11 @@
+error[E0477]: the type `&'a u32` does not fulfill the required lifetime
+ --> $DIR/issue-54943.rs:6:13
+ |
+LL | let x = foo::<&'a u32>();
+ | ^^^^^^^^^^^^^^
+ = note: type must satisfy the static lifetime
8
9
+error: aborting due to previous error
10
11
+For more information about this error, try `rustc --explain E0477`.
0 commit comments