]> git.proxmox.com Git - rustc.git/blame - src/doc/book/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt
New upstream version 1.57.0+dfsg1
[rustc.git] / src / doc / book / listings / ch04-understanding-ownership / no-listing-14-dangling-reference / output.txt
CommitLineData
74b04a01
XL
1$ cargo run
2 Compiling ownership v0.1.0 (file:///projects/ownership)
3error[E0106]: missing lifetime specifier
4 --> src/main.rs:5:16
5 |
65 | 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
10help: consider using the `'static` lifetime
11 |
125 | fn dangle() -> &'static String {
13 | ^^^^^^^^
74b04a01 14
74b04a01 15For more information about this error, try `rustc --explain E0106`.
c295e0f8 16error: could not compile `ownership` due to previous error