2023-07-09 20:10:03 -05:00
|
|
|
error[E0637]: `&` without an explicit lifetime name cannot be used here
|
|
|
|
--> $DIR/elided-lifetimes.rs:8:5
|
|
|
|
|
|
|
|
|
LL | &T: Copy;
|
|
|
|
| ^ explicit lifetime name needed here
|
|
|
|
|
|
|
|
|
help: consider introducing a higher-ranked lifetime here
|
|
|
|
|
|
|
|
|
LL | for<'a> &'a T: Copy;
|
|
|
|
| +++++++ ++
|
|
|
|
|
|
|
|
error[E0637]: `&` without an explicit lifetime name cannot be used here
|
|
|
|
--> $DIR/elided-lifetimes.rs:10:18
|
|
|
|
|
|
|
|
|
LL | const I<const S: &str>: &str = "";
|
|
|
|
| ^ explicit lifetime name needed here
|
|
|
|
|
|
|
|
error[E0637]: `'_` cannot be used here
|
|
|
|
--> $DIR/elided-lifetimes.rs:14:18
|
|
|
|
|
|
|
|
|
LL | const B<T: Trait<'_>>: () = ();
|
|
|
|
| ^^ `'_` is a reserved lifetime name
|
|
|
|
|
|
|
|
error: `&str` is forbidden as the type of a const generic parameter
|
|
|
|
--> $DIR/elided-lifetimes.rs:10:18
|
|
|
|
|
|
|
|
|
LL | const I<const S: &str>: &str = "";
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= note: the only supported types are integers, `bool` and `char`
|
2024-03-07 16:09:00 -06:00
|
|
|
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
|
|
|
|
|
|
|
|
|
LL + #![feature(adt_const_params)]
|
|
|
|
|
|
2024-07-14 07:38:51 -05:00
|
|
|
help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
|
|
|
|
|
|
|
|
|
LL + #![feature(unsized_const_params)]
|
|
|
|
|
|
2023-07-09 20:10:03 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0637`.
|