diff options
Diffstat (limited to 'src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt')
-rw-r--r-- | src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt b/src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt new file mode 100644 index 000000000..b63bf83a1 --- /dev/null +++ b/src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt @@ -0,0 +1,15 @@ +$ cargo run + Compiling chapter10 v0.1.0 (file:///projects/chapter10) +error[E0597]: `x` does not live long enough + --> src/main.rs:6:13 + | +6 | r = &x; + | ^^ borrowed value does not live long enough +7 | } + | - `x` dropped here while still borrowed +8 | +9 | println!("r: {}", r); + | - borrow later used here + +For more information about this error, try `rustc --explain E0597`. +error: could not compile `chapter10` due to previous error |