diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-52126-assign-op-invariance.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-52126-assign-op-invariance.stderr b/src/test/ui/issues/issue-52126-assign-op-invariance.stderr new file mode 100644 index 000000000..d45067577 --- /dev/null +++ b/src/test/ui/issues/issue-52126-assign-op-invariance.stderr @@ -0,0 +1,15 @@ +error[E0597]: `line` does not live long enough + --> $DIR/issue-52126-assign-op-invariance.rs:34:28 + | +LL | let v: Vec<&str> = line.split_whitespace().collect(); + | ^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough +... +LL | acc += cnt2; + | --- borrow later used here +... +LL | } + | - `line` dropped here while still borrowed + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0597`. |