blob: 256523c4a47ec2e19b6f4f0566b7b8cc964105f8 [file]
error[E0106]: missing lifetime specifier
--> $DIR/thin-ptr-to-unsized-projection.rs:2:17
|
LL | struct Foo<'a>(<& /*'a*/ [fn()] as core::ops::Deref>::Target); // adding the lifetime solves the ice
| ^ expected named lifetime parameter
|
help: consider using the `'a` lifetime
|
LL | struct Foo<'a>(<&'a /*'a*/ [fn()] as core::ops::Deref>::Target); // adding the lifetime solves the ice
| ++
error[E0606]: cannot cast `i32` to a pointer that is wide
--> $DIR/thin-ptr-to-unsized-projection.rs:4:28
|
LL | const _: *const Foo = 0 as _;
| - ^ creating a `*const Foo<'_>` requires both an address and a length
| |
| consider casting this expression to `*const ()`, then using `core::ptr::from_raw_parts`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0106, E0606.
For more information about an error, try `rustc --explain E0106`.