summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-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/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr')
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
deleted file mode 100644
index 7991abeb7..000000000
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
+++ /dev/null
@@ -1,69 +0,0 @@
-note: no external requirements
- --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15
- |
-LL | foo(cell, |cell_a, cell_x| {
- | ^^^^^^^^^^^^^^^^
- |
- = note: defining type: case1::{closure#0} with closure substs [
- i32,
- for<Region(BrAnon(0, None))> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(0, None) }) u32>)),
- (),
- ]
-
-error[E0521]: borrowed data escapes outside of closure
- --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:22:9
- |
-LL | foo(cell, |cell_a, cell_x| {
- | ------ ------ `cell_x` is a reference that is only valid in the closure body
- | |
- | `cell_a` declared here, outside of the closure body
-LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
- | ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here
-
-note: no external requirements
- --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1
- |
-LL | fn case1() {
- | ^^^^^^^^^^
- |
- = note: defining type: case1
-
-note: external requirements
- --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15
- |
-LL | foo(cell, |cell_a, cell_x| {
- | ^^^^^^^^^^^^^^^^
- |
- = note: defining type: case2::{closure#0} with closure substs [
- i32,
- for<Region(BrAnon(0, None))> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(0, None) }) u32>)),
- (),
- ]
- = note: number of external vids: 2
- = note: where '_#1r: '_#0r
-
-note: no external requirements
- --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
- |
-LL | fn case2() {
- | ^^^^^^^^^^
- |
- = note: defining type: case2
-
-error[E0597]: `a` does not live long enough
- --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:30:26
- |
-LL | let cell = Cell::new(&a);
- | ^^ borrowed value does not live long enough
-...
-LL | / foo(cell, |cell_a, cell_x| {
-LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error
-LL | | })
- | |______- argument requires that `a` is borrowed for `'static`
-LL | }
- | - `a` dropped here while still borrowed
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0521, E0597.
-For more information about an error, try `rustc --explain E0521`.