rust/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-1.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
569 B
Plaintext
Raw Normal View History

2022-11-06 10:26:25 -06:00
error[E0597]: `x` does not live long enough
--> $DIR/implied-bounds-on-trait-hierarchy-1.rs:34:23
|
LL | let x = "Hello World".to_string();
| - binding `x` declared here
LL | subs_to_soup((x.as_str(), &mut d));
| ^ borrowed value does not live long enough
LL |
LL | }
| - `x` dropped here while still borrowed
LL | println!("{}", d);
| - borrow later used here
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.