diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr')
-rw-r--r-- | src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr deleted file mode 100644 index f738b03ee..000000000 --- a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error[E0506]: cannot assign to `i` because it is borrowed - --> $DIR/try-block-maybe-bad-lifetime.rs:17:9 - | -LL | &i - | -- borrow of `i` occurs here -LL | }; -LL | i = 0; - | ^^^^^ assignment to borrowed `i` occurs here -LL | let _ = i; -LL | do_something_with(x); - | - borrow later used here - -error[E0382]: borrow of moved value: `x` - --> $DIR/try-block-maybe-bad-lifetime.rs:28:24 - | -LL | let x = String::new(); - | - move occurs because `x` has type `String`, which does not implement the `Copy` trait -... -LL | ::std::mem::drop(x); - | - value moved here -LL | }; -LL | println!("{}", x); - | ^ value borrowed here after move - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider cloning the value if the performance cost is acceptable - | -LL | ::std::mem::drop(x.clone()); - | ++++++++ - -error[E0506]: cannot assign to `i` because it is borrowed - --> $DIR/try-block-maybe-bad-lifetime.rs:40:9 - | -LL | j = &i; - | -- borrow of `i` occurs here -LL | }; -LL | i = 0; - | ^^^^^ assignment to borrowed `i` occurs here -LL | let _ = i; -LL | do_something_with(j); - | - borrow later used here - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0382, E0506. -For more information about an error, try `rustc --explain E0382`. |