2024-03-22 03:02:12 -05:00
|
|
|
error[E0792]: expected generic lifetime parameter, found `'static`
|
2024-03-28 01:11:09 -05:00
|
|
|
--> $DIR/defining-use-captured-non-universal-region.rs:9:18
|
2024-03-18 11:03:18 -05:00
|
|
|
|
|
2024-03-22 03:02:12 -05:00
|
|
|
LL | fn foo<'a>() -> impl Sized + 'a {
|
|
|
|
| -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
|
|
|
|
LL | #[cfg(statik)]
|
2024-03-18 11:03:18 -05:00
|
|
|
LL | let i: i32 = foo::<'static>();
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
2024-03-22 03:02:12 -05:00
|
|
|
error: aborting due to 1 previous error
|
2024-03-18 11:03:18 -05:00
|
|
|
|
2024-03-22 03:02:12 -05:00
|
|
|
For more information about this error, try `rustc --explain E0792`.
|