]>
Commit | Line | Data |
---|---|---|
74b04a01 XL |
1 | $ cargo run |
2 | Compiling ownership v0.1.0 (file:///projects/ownership) | |
3 | error[E0106]: missing lifetime specifier | |
4 | --> src/main.rs:5:16 | |
5 | | | |
6 | 5 | fn dangle() -> &String { | |
fc512014 | 7 | | ^ expected named lifetime parameter |
74b04a01 XL |
8 | | |
9 | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from | |
fc512014 XL |
10 | help: consider using the `'static` lifetime |
11 | | | |
12 | 5 | fn dangle() -> &'static String { | |
13 | | ^^^^^^^^ | |
74b04a01 | 14 | |
74b04a01 | 15 | For more information about this error, try `rustc --explain E0106`. |
c295e0f8 | 16 | error: could not compile `ownership` due to previous error |