Closed
Description
The suggestion to change &str
to &'a str
and give ZstAssert
a <'a>
generic argument places the <'a>
at the beginning of the file. If you add any items before the trait decl, the suggestion will be before those unrelated items.
trait ZstAssert: Sized {
const TYPE_NAME: &str = "";
}
Errors:
Compiling playground v0.0.1 (/playground)
error[E0106]: missing lifetime specifier
--> src/lib.rs:2:22
|
2 | const TYPE_NAME: &str = "";
| ^ expected named lifetime parameter
|
help: consider introducing a named lifetime parameter
|
1 | <'a>trait ZstAssert: Sized {
2 | const TYPE_NAME: &'a str = "";
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0106`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.