rust/tests/ui/generic-const-items/elided-lifetimes.stderr
Barrett Ray c5598d6a9e fix(hir_analysis/wfcheck): don't leak {type error}
avoid `{type error}` being leaked in user-facing messages,
particularly when using the `adt_const_params` feature
2024-09-29 23:40:43 -05:00

27 lines
797 B
Plaintext

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:13:18
|
LL | const B<T: Trait<'_>>: () = ();
| ^^ `'_` is a reserved lifetime name
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0637`.