summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll')
-rw-r--r--src/test/ui/nll/closure-requirements/escape-argument-callee.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/escape-argument.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr20
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr12
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr12
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr6
-rw-r--r--src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr7
-rw-r--r--src/test/ui/nll/issue-21232-partial-init-and-use.rs2
-rw-r--r--src/test/ui/nll/issue-51244.stderr2
-rw-r--r--src/test/ui/nll/local-outlives-static-via-hrtb.stderr12
-rw-r--r--src/test/ui/nll/normalization-bounds-error.stderr8
-rw-r--r--src/test/ui/nll/polonius/assignment-kills-loans.rs2
-rw-r--r--src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs1
-rw-r--r--src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr11
-rw-r--r--src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr22
-rw-r--r--src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr22
-rw-r--r--src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr27
-rw-r--r--src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr26
-rw-r--r--src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr43
-rw-r--r--src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr14
-rw-r--r--src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr6
-rw-r--r--src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr27
-rw-r--r--src/test/ui/nll/type-test-universe.stderr6
-rw-r--r--src/test/ui/nll/user-annotations/adt-nullary-enums.stderr5
-rw-r--r--src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr10
-rw-r--r--src/test/ui/nll/user-annotations/fns.stderr6
-rw-r--r--src/test/ui/nll/user-annotations/method-call.stderr5
-rw-r--r--src/test/ui/nll/user-annotations/method-ufcs-3.stderr5
36 files changed, 121 insertions, 298 deletions
diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
index f86a19fff..59b848ea8 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
@@ -22,14 +22,8 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
note: no external requirements
--> $DIR/escape-argument-callee.rs:20:1
|
-LL | / fn test() {
-LL | | let x = 44;
-LL | | let mut p = &x;
-LL | |
-... |
-LL | | deref(p);
-LL | | }
- | |_^
+LL | fn test() {
+ | ^^^^^^^^^
|
= note: defining type: test
diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr
index 8cd8b43ca..ff4e8e590 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr
@@ -13,14 +13,8 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
note: no external requirements
--> $DIR/escape-argument.rs:20:1
|
-LL | / fn test() {
-LL | | let x = 44;
-LL | | let mut p = &x;
-LL | |
-... |
-LL | | deref(p);
-LL | | }
- | |_^
+LL | fn test() {
+ | ^^^^^^^^^
|
= note: defining type: test
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
index abf80e039..4fbd5eb19 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
@@ -29,14 +29,8 @@ LL | let mut closure = || {
note: no external requirements
--> $DIR/escape-upvar-nested.rs:13:1
|
-LL | / fn test() {
-LL | | let x = 44;
-LL | | let mut p = &x;
-LL | |
-... |
-LL | | deref(p);
-LL | | }
- | |_^
+LL | fn test() {
+ | ^^^^^^^^^
|
= note: defining type: test
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
index bc7546421..bc1ceac5b 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
@@ -15,14 +15,8 @@ LL | let mut closure = || p = &y;
note: no external requirements
--> $DIR/escape-upvar-ref.rs:17:1
|
-LL | / fn test() {
-LL | | let x = 44;
-LL | | let mut p = &x;
-LL | |
-... |
-LL | | deref(p);
-LL | | }
- | |_^
+LL | fn test() {
+ | ^^^^^^^^^
|
= note: defining type: test
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
index b9b0f3ad2..0d94fca28 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
@@ -27,14 +27,8 @@ LL | demand_y(x, y, p)
note: no external requirements
--> $DIR/propagate-approximated-fail-no-postdom.rs:38:1
|
-LL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
-LL | | establish_relationships(
-LL | | cell_a,
-LL | | cell_b,
-... |
-LL | | );
-LL | | }
- | |_^
+LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
index a2371ee31..435a53533 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
@@ -17,14 +17,8 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
note: no external requirements
--> $DIR/propagate-approximated-ref.rs:42:1
|
-LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
-LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
-LL | | // Only works if 'x: 'y:
-LL | | demand_y(x, y, x.get())
-LL | |
-LL | | });
-LL | | }
- | |_^
+LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
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
index e53ae167f..6aafbe42c 100644
--- 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
@@ -23,14 +23,8 @@ LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1
|
-LL | / fn case1() {
-LL | | let a = 0;
-LL | | let cell = Cell::new(&a);
-LL | | foo(cell, |cell_a, cell_x| {
-... |
-LL | | })
-LL | | }
- | |_^
+LL | fn case1() {
+ | ^^^^^^^^^^
|
= note: defining type: case1
@@ -51,14 +45,8 @@ LL | foo(cell, |cell_a, cell_x| {
note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
|
-LL | / fn case2() {
-LL | | let a = 0;
-LL | | let cell = Cell::new(&a);
-LL | |
-... |
-LL | | })
-LL | | }
- | |_^
+LL | fn case2() {
+ | ^^^^^^^^^^
|
= note: defining type: case2
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
index c3c7eb1bd..c95907ea7 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
@@ -17,14 +17,8 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1
|
-LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
-LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
-LL | |
-LL | |
-... |
-LL | | });
-LL | | }
- | |_^
+LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
@@ -46,7 +40,7 @@ LL | | });
| |______`cell_a` escapes the function body here
| argument requires that `'a` must outlive `'static`
|
- = note: requirement occurs because of the type `Cell<&'_#10r u32>`, which makes the generic argument `&'_#10r u32` invariant
+ = note: requirement occurs because of the type `Cell<&'_#9r u32>`, which makes the generic argument `&'_#9r u32` invariant
= note: the struct `Cell<T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
index 846e5aedb..db58d9d6f 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
@@ -17,14 +17,8 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:34:1
|
-LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
-LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
-LL | |
-LL | |
-... |
-LL | | });
-LL | | }
- | |_^
+LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
@@ -46,7 +40,7 @@ LL | | });
| |______`cell_a` escapes the function body here
| argument requires that `'a` must outlive `'static`
|
- = note: requirement occurs because of the type `Cell<&'_#11r u32>`, which makes the generic argument `&'_#11r u32` invariant
+ = note: requirement occurs because of the type `Cell<&'_#10r u32>`, which makes the generic argument `&'_#10r u32` invariant
= note: the struct `Cell<T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
index a570932ed..be5f1e5ef 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
@@ -17,14 +17,8 @@ LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
note: no external requirements
--> $DIR/propagate-approximated-val.rs:35:1
|
-LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
-LL | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
-LL | | // Only works if 'x: 'y:
-LL | | demand_y(outlives1, outlives2, x.get())
-LL | |
-LL | | });
-LL | | }
- | |_^
+LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: test
diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
index 407bc6764..d18db97be 100644
--- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
@@ -16,14 +16,8 @@ LL | |_outlives1, _outlives2, x, y| {
note: no external requirements
--> $DIR/propagate-despite-same-free-region.rs:39:1
|
-LL | / fn supply<'a>(cell_a: Cell<&'a u32>) {
-LL | | establish_relationships(
-LL | | cell_a,
-LL | | |_outlives1, _outlives2, x, y| {
-... |
-LL | | );
-LL | | }
- | |_^
+LL | fn supply<'a>(cell_a: Cell<&'a u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
index fcb55d37f..e6f88de4e 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
@@ -26,14 +26,8 @@ LL | demand_y(x, y, x.get())
note: no external requirements
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:34:1
|
-LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
-LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
-LL | | // Only works if 'x: 'y:
-LL | | demand_y(x, y, x.get())
-LL | |
-LL | | });
-LL | | }
- | |_^
+LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
index 75beae39e..5f5fce771 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
@@ -26,14 +26,8 @@ LL | demand_y(x, y, x.get())
note: no external requirements
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:38:1
|
-LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
-LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
-LL | | // Only works if 'x: 'y:
-LL | | demand_y(x, y, x.get())
-LL | |
-LL | | });
-LL | | }
- | |_^
+LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: supply
diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
index 58aced2bf..750b08bbe 100644
--- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
@@ -18,11 +18,7 @@ note: no external requirements
LL | / fn supply<'a, T>(value: T)
LL | | where
LL | | T: Trait<'a>,
-LL | | {
-... |
-LL | | });
-LL | | }
- | |_^
+ | |_________________^
|
= note: defining type: supply::<'_#1r, T>
diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
index 1c9d0c835..da89071ea 100644
--- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
+++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
@@ -22,11 +22,8 @@ LL | expect_sig(|a, b| b); // ought to return `a`
note: no external requirements
--> $DIR/return-wrong-bound-region.rs:10:1
|
-LL | / fn test() {
-LL | | expect_sig(|a, b| b); // ought to return `a`
-LL | |
-LL | | }
- | |_^
+LL | fn test() {
+ | ^^^^^^^^^
|
= note: defining type: test
diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.rs b/src/test/ui/nll/issue-21232-partial-init-and-use.rs
index 4cd1e406f..ad3eb2483 100644
--- a/src/test/ui/nll/issue-21232-partial-init-and-use.rs
+++ b/src/test/ui/nll/issue-21232-partial-init-and-use.rs
@@ -53,7 +53,7 @@ impl<F> R<F> { fn new(f: F) -> Self { R { w: 0, f } } }
// * local/field: Is the structure in a local or a field
// * fully/partial/void: Are we fully initializing it before using any part?
// Is whole type empty due to a void component?
-// * init/reinit: First initialization, or did we previously inititalize and then move out?
+// * init/reinit: First initialization, or did we previously initialize and then move out?
// * struct/tuple: Is this a struct or a (X, Y).
//
// As a shorthand for the cases above, adding a numeric summary to
diff --git a/src/test/ui/nll/issue-51244.stderr b/src/test/ui/nll/issue-51244.stderr
index 19f0223a3..dcb6f9fec 100644
--- a/src/test/ui/nll/issue-51244.stderr
+++ b/src/test/ui/nll/issue-51244.stderr
@@ -2,7 +2,7 @@ error[E0594]: cannot assign to `*my_ref`, which is behind a `&` reference
--> $DIR/issue-51244.rs:3:5
|
LL | let ref my_ref @ _ = 0;
- | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _`
+ | ---------- help: consider changing this to be a mutable reference: `ref mut my_ref`
LL | *my_ref = 0;
| ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written
diff --git a/src/test/ui/nll/local-outlives-static-via-hrtb.stderr b/src/test/ui/nll/local-outlives-static-via-hrtb.stderr
index 61009da49..f5c10f3dd 100644
--- a/src/test/ui/nll/local-outlives-static-via-hrtb.stderr
+++ b/src/test/ui/nll/local-outlives-static-via-hrtb.stderr
@@ -9,6 +9,12 @@ LL | assert_static_via_hrtb(&local);
LL | assert_static_via_hrtb_with_assoc_type(&&local);
LL | }
| - `local` dropped here while still borrowed
+ |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+ --> $DIR/local-outlives-static-via-hrtb.rs:15:53
+ |
+LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
+ | ^^^^^^^^^^^^
error[E0597]: `local` does not live long enough
--> $DIR/local-outlives-static-via-hrtb.rs:25:45
@@ -20,6 +26,12 @@ LL | assert_static_via_hrtb_with_assoc_type(&&local);
| argument requires that `local` is borrowed for `'static`
LL | }
| - `local` dropped here while still borrowed
+ |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+ --> $DIR/local-outlives-static-via-hrtb.rs:19:20
+ |
+LL | for<'a> &'a T: Reference<AssociatedType = &'a ()>,
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
diff --git a/src/test/ui/nll/normalization-bounds-error.stderr b/src/test/ui/nll/normalization-bounds-error.stderr
index 6da3d5d96..6abe53127 100644
--- a/src/test/ui/nll/normalization-bounds-error.stderr
+++ b/src/test/ui/nll/normalization-bounds-error.stderr
@@ -1,8 +1,8 @@
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'d` due to conflicting requirements
- --> $DIR/normalization-bounds-error.rs:12:4
+ --> $DIR/normalization-bounds-error.rs:12:1
|
LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
- | ^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime `'d` as defined here...
--> $DIR/normalization-bounds-error.rs:12:14
@@ -15,10 +15,10 @@ note: ...but the lifetime must also be valid for the lifetime `'a` as defined he
LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
| ^^
note: ...so that the types are compatible
- --> $DIR/normalization-bounds-error.rs:12:4
+ --> $DIR/normalization-bounds-error.rs:12:1
|
LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
- | ^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: expected `Visitor<'d>`
found `Visitor<'_>`
diff --git a/src/test/ui/nll/polonius/assignment-kills-loans.rs b/src/test/ui/nll/polonius/assignment-kills-loans.rs
index c4cf20389..696bf61ce 100644
--- a/src/test/ui/nll/polonius/assignment-kills-loans.rs
+++ b/src/test/ui/nll/polonius/assignment-kills-loans.rs
@@ -1,7 +1,7 @@
#![allow(dead_code)]
// This tests the various kinds of assignments there are. Polonius used to generate `killed`
-// facts only on simple assigments, but not projections, incorrectly causing errors to be emitted
+// facts only on simple assignments, but not projections, incorrectly causing errors to be emitted
// for code accepted by NLL. They are all variations from example code in the NLL RFC.
// check-pass
diff --git a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs b/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs
index c4db6fc97..05e2ea047 100644
--- a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs
+++ b/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs
@@ -30,4 +30,5 @@ fn main() {
let _x = <fn(&())>::make_f();
//~^ ERROR implementation of `Y` is not general enough
//~| ERROR implementation of `Y` is not general enough
+ //~| ERROR implementation of `Y` is not general enough
}
diff --git a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr b/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr
index 51adfca3e..8c4737988 100644
--- a/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr
+++ b/src/test/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.stderr
@@ -16,5 +16,14 @@ LL | let _x = <fn(&())>::make_f();
= note: `Y` would have to be implemented for the type `for<'r> fn(&'r ())`
= note: ...but `Y` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`
-error: aborting due to 2 previous errors
+error: implementation of `Y` is not general enough
+ --> $DIR/impl-fn-ignore-binder-via-bottom.rs:30:14
+ |
+LL | let _x = <fn(&())>::make_f();
+ | ^^^^^^^^^^^^^^^^^^^ implementation of `Y` is not general enough
+ |
+ = note: `Y` would have to be implemented for the type `for<'r> fn(&'r ())`
+ = note: ...but `Y` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`
+
+error: aborting due to 3 previous errors
diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
index feab24769..ee1f7b64b 100644
--- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
@@ -18,11 +18,7 @@ note: no external requirements
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: Iterator,
-LL | | {
-LL | | with_signature(x, |mut y| Box::new(y.next()))
-LL | |
-LL | | }
- | |_^
+ | |________________^
|
= note: defining type: no_region::<'_#1r, T>
@@ -55,10 +51,7 @@ note: no external requirements
LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: 'a + Iterator,
-LL | | {
-LL | | with_signature(x, |mut y| Box::new(y.next()))
-LL | | }
- | |_^
+ | |_____________________^
|
= note: defining type: correct_region::<'_#1r, T>
@@ -82,11 +75,7 @@ note: no external requirements
LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: 'b + Iterator,
-LL | | {
-LL | | with_signature(x, |mut y| Box::new(y.next()))
-LL | |
-LL | | }
- | |_^
+ | |_____________________^
|
= note: defining type: wrong_region::<'_#1r, '_#2r, T>
@@ -120,10 +109,7 @@ LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: 'b + Iterator,
LL | | 'b: 'a,
-LL | | {
-LL | | with_signature(x, |mut y| Box::new(y.next()))
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: outlives_region::<'_#1r, '_#2r, T>
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
index 98063bd0a..4e57dfad7 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
@@ -20,11 +20,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
-LL | | {
-... |
-LL | |
-LL | | }
- | |_^
+ | |____________________^
|
= note: defining type: no_relationships_late::<'_#1r, T>
@@ -74,10 +70,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'a: 'a,
-... |
-LL | |
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
@@ -126,10 +119,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |_____________________^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>
@@ -155,10 +145,8 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | T: 'a,
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+LL | | 'b: 'a,
+ | |___________^
|
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
index 45e61bcbd..250c796e2 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
@@ -19,11 +19,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | |
-LL | | }
- | |_^
+ | |____________________^
|
= note: defining type: no_relationships_late::<'_#1r, T>
@@ -61,10 +57,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'a: 'a,
-... |
-LL | |
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
@@ -102,10 +95,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |_____________________^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>
@@ -130,10 +120,7 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'b: 'a,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>
@@ -157,11 +144,7 @@ note: no external requirements
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'a>,
-LL | | {
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |____________________^
|
= note: defining type: one_region::<'_#1r, T>
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
index f2549205b..b27186b05 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
@@ -17,10 +17,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |____________________^
|
= note: defining type: no_relationships_late::<'_#1r, T>
@@ -43,10 +40,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'a: 'a,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
@@ -69,10 +63,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |_____________________^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>
@@ -95,10 +86,7 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b>,
LL | | 'b: 'a,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>
@@ -120,11 +108,7 @@ note: no external requirements
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'a>,
-LL | | {
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |____________________^
|
= note: defining type: one_region::<'_#1r, T>
diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
index 8e1b6fa2e..0195a693e 100644
--- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
@@ -19,11 +19,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'c>,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | |
-LL | | }
- | |_^
+ | |________________________^
|
= note: defining type: no_relationships_late::<'_#1r, '_#2r, T>
@@ -57,10 +53,7 @@ LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'c>,
LL | | 'a: 'a,
-... |
-LL | |
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>
@@ -94,10 +87,7 @@ LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'c>,
LL | | T::AssocType: 'a,
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |_____________________^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>
@@ -122,10 +112,7 @@ LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'c>,
LL | | 'b: 'a,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>
@@ -150,10 +137,7 @@ LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'c>,
LL | | 'c: 'a,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>
@@ -178,11 +162,7 @@ note: no external requirements
LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'b>,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | |
-LL | | }
- | |_^
+ | |________________________^
|
= note: defining type: two_regions::<'_#1r, T>
@@ -220,10 +200,7 @@ LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'b, 'b>,
LL | | 'b: 'a,
-LL | | {
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>
@@ -247,11 +224,7 @@ note: no external requirements
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | | T: Anything<'a, 'a>,
-LL | | {
-... |
-LL | | with_signature(cell, t, |cell, t| require(cell, t));
-LL | | }
- | |_^
+ | |________________________^
|
= note: defining type: one_region::<'_#1r, T>
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
index 12c76d198..5d9a044d1 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
+++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
@@ -15,11 +15,8 @@ LL | twice(cell, value, |a, b| invoke(a, b));
note: no external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
|
-LL | / fn generic<T>(value: T) {
-LL | | let cell = Cell::new(&());
-LL | | twice(cell, value, |a, b| invoke(a, b));
-LL | | }
- | |_^
+LL | fn generic<T>(value: T) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: generic::<T>
@@ -41,11 +38,8 @@ LL | twice(cell, value, |a, b| invoke(a, b));
note: no external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
|
-LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
-LL | | twice(cell, value, |a, b| invoke(a, b));
-LL | |
-LL | | }
- | |_^
+LL | fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: generic_fail::<T>
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
index 35741859d..50d9e3aab 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
+++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
@@ -18,11 +18,7 @@ note: no external requirements
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
LL | | where
LL | | T: Debug,
-LL | | {
-... |
-LL | |
-LL | | }
- | |_^
+ | |_____________^
|
= note: defining type: no_region::<'_#1r, T>
diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
index 0261bc39e..14c55e32a 100644
--- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
+++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
@@ -16,14 +16,8 @@ LL | with_signature(a, b, |x, y| {
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
|
-LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
-LL | | with_signature(a, b, |x, y| {
-LL | |
-LL | | //
-... |
-LL | | })
-LL | | }
- | |_^
+LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_region::<T>
@@ -65,11 +59,7 @@ note: no external requirements
LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
LL | | where
LL | | T: 'a,
-LL | | {
-... |
-LL | | })
-LL | | }
- | |_^
+ | |__________^
|
= note: defining type: correct_region::<'_#1r, T>
@@ -94,11 +84,7 @@ note: no external requirements
LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
LL | | where
LL | | T: 'b,
-LL | | {
-... |
-LL | | })
-LL | | }
- | |_^
+ | |__________^
|
= note: defining type: wrong_region::<'_#1r, T>
@@ -139,10 +125,7 @@ LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
LL | | where
LL | | T: 'b,
LL | | 'b: 'a,
-... |
-LL | | })
-LL | | }
- | |_^
+ | |___________^
|
= note: defining type: outlives_region::<'_#1r, '_#2r, T>
diff --git a/src/test/ui/nll/type-test-universe.stderr b/src/test/ui/nll/type-test-universe.stderr
index 242486c36..31e17d64b 100644
--- a/src/test/ui/nll/type-test-universe.stderr
+++ b/src/test/ui/nll/type-test-universe.stderr
@@ -11,6 +11,12 @@ LL | fn test2<'a>() {
| -- lifetime `'a` defined here
LL | outlives_forall::<Value<'a>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+ |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+ --> $DIR/type-test-universe.rs:6:16
+ |
+LL | for<'u> T: 'u,
+ | ^^
error: aborting due to 2 previous errors
diff --git a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr b/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr
index ee332278c..3326fa521 100644
--- a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr
+++ b/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr
@@ -30,14 +30,15 @@ error[E0597]: `c` does not live long enough
|
LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
| -- lifetime `'a` defined here
-LL | let _closure = || {
- | - `c` dropped here while still borrowed
...
LL | SomeEnum::SomeVariant(Cell::new(&c)),
| ----------^^-
| | |
| | borrowed value does not live long enough
| argument requires that `c` is borrowed for `'a`
+...
+LL | };
+ | - `c` dropped here while still borrowed
error: aborting due to 3 previous errors
diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr b/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr
index 95bbd62c4..9664fb9f5 100644
--- a/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr
+++ b/src/test/ui/nll/user-annotations/adt-tuple-struct-calls.stderr
@@ -28,28 +28,28 @@ error[E0597]: `c` does not live long enough
|
LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
| -- lifetime `'a` defined here
-LL | let _closure = || {
- | - `c` dropped here while still borrowed
...
LL | f(&c);
| --^^-
| | |
| | borrowed value does not live long enough
| argument requires that `c` is borrowed for `'a`
+LL | };
+ | - `c` dropped here while still borrowed
error[E0597]: `c` does not live long enough
--> $DIR/adt-tuple-struct-calls.rs:53:11
|
LL | let f = SomeStruct::<&'a u32>;
| - lifetime `'1` appears in the type of `f`
-LL | let _closure = || {
- | - `c` dropped here while still borrowed
-LL | let c = 66;
+...
LL | f(&c);
| --^^-
| | |
| | borrowed value does not live long enough
| argument requires that `c` is borrowed for `'1`
+LL | };
+ | - `c` dropped here while still borrowed
error: aborting due to 4 previous errors
diff --git a/src/test/ui/nll/user-annotations/fns.stderr b/src/test/ui/nll/user-annotations/fns.stderr
index bd4d121d5..e0640da39 100644
--- a/src/test/ui/nll/user-annotations/fns.stderr
+++ b/src/test/ui/nll/user-annotations/fns.stderr
@@ -28,14 +28,14 @@ error[E0597]: `c` does not live long enough
|
LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
| -- lifetime `'a` defined here
-LL | let _closure = || {
- | - `c` dropped here while still borrowed
-LL | let c = 66;
+...
LL | some_fn::<&'a u32>(&c);
| -------------------^^-
| | |
| | borrowed value does not live long enough
| argument requires that `c` is borrowed for `'a`
+LL | };
+ | - `c` dropped here while still borrowed
error: aborting due to 3 previous errors
diff --git a/src/test/ui/nll/user-annotations/method-call.stderr b/src/test/ui/nll/user-annotations/method-call.stderr
index fcaeb465d..10447e45a 100644
--- a/src/test/ui/nll/user-annotations/method-call.stderr
+++ b/src/test/ui/nll/user-annotations/method-call.stderr
@@ -29,14 +29,13 @@ error[E0597]: `c` does not live long enough
LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
| -- lifetime `'a` defined here
...
-LL | let _closure = || {
- | - `c` dropped here while still borrowed
-LL | let c = 66;
LL | a.method::<&'a u32>(b, &c);
| ------------------------^^-
| | |
| | borrowed value does not live long enough
| argument requires that `c` is borrowed for `'a`
+LL | };
+ | - `c` dropped here while still borrowed
error: aborting due to 3 previous errors
diff --git a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr b/src/test/ui/nll/user-annotations/method-ufcs-3.stderr
index 328dde980..e7851833e 100644
--- a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr
+++ b/src/test/ui/nll/user-annotations/method-ufcs-3.stderr
@@ -29,14 +29,13 @@ error[E0597]: `c` does not live long enough
LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
| -- lifetime `'a` defined here
...
-LL | let _closure = || {
- | - `c` dropped here while still borrowed
-LL | let c = 66;
LL | <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c);
| -------------------------------------------^^-
| | |
| | borrowed value does not live long enough
| argument requires that `c` is borrowed for `'a`
+LL | };
+ | - `c` dropped here while still borrowed
error: aborting due to 3 previous errors