You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
$ cargo run
|
|
|
|
Compiling structs v0.1.0 (file:///projects/structs)
|
|
|
|
error[E0106]: missing lifetime specifier
|
|
|
|
--> src/main.rs:3:15
|
|
|
|
|
|
|
|
|
3 | username: &str,
|
|
|
|
| ^ expected named lifetime parameter
|
|
|
|
|
|
|
|
|
help: consider introducing a named lifetime parameter
|
|
|
|
|
|
|
|
|
1 ~ struct User<'a> {
|
|
|
|
2 | active: bool,
|
|
|
|
3 ~ username: &'a str,
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0106]: missing lifetime specifier
|
|
|
|
--> src/main.rs:4:12
|
|
|
|
|
|
|
|
|
4 | email: &str,
|
|
|
|
| ^ expected named lifetime parameter
|
|
|
|
|
|
|
|
|
help: consider introducing a named lifetime parameter
|
|
|
|
|
|
|
|
|
1 ~ struct User<'a> {
|
|
|
|
2 | active: bool,
|
|
|
|
3 | username: &str,
|
|
|
|
4 ~ email: &'a str,
|
|
|
|
|
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0106`.
|
|
|
|
error: could not compile `structs` (bin "structs") due to 2 previous errors
|