summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/ty-outlives
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /tests/ui/nll/ty-outlives
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/nll/ty-outlives')
-rw-r--r--tests/ui/nll/ty-outlives/projection-body.rs2
-rw-r--r--tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr32
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-closure.stderr40
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr42
-rw-r--r--tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr32
-rw-r--r--tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr82
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr10
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs4
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr8
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr32
10 files changed, 143 insertions, 141 deletions
diff --git a/tests/ui/nll/ty-outlives/projection-body.rs b/tests/ui/nll/ty-outlives/projection-body.rs
index b03a539eb..722d67471 100644
--- a/tests/ui/nll/ty-outlives/projection-body.rs
+++ b/tests/ui/nll/ty-outlives/projection-body.rs
@@ -3,6 +3,8 @@
//
// check-pass
+#![allow(dropping_references)]
+
trait MyTrait<'a> {
type Output;
}
diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
index 4933b9348..4eefb180e 100644
--- a/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr
@@ -4,13 +4,13 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^
|
- = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: no_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
+ extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?2)>,
(),
]
= note: number of external vids: 3
- = note: where <T as std::iter::Iterator>::Item: '_#2r
+ = note: where <T as std::iter::Iterator>::Item: '?2
note: no external requirements
--> $DIR/projection-no-regions-closure.rs:21:1
@@ -20,7 +20,7 @@ LL | | where
LL | | T: Iterator,
| |________________^
|
- = note: defining type: no_region::<'_#1r, T>
+ = note: defining type: no_region::<'?1, T>
error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:25:31
@@ -37,13 +37,13 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^
|
- = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: correct_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
+ extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?2)>,
(),
]
= note: number of external vids: 3
- = note: where <T as std::iter::Iterator>::Item: '_#2r
+ = note: where <T as std::iter::Iterator>::Item: '?2
note: no external requirements
--> $DIR/projection-no-regions-closure.rs:30:1
@@ -53,7 +53,7 @@ LL | | where
LL | | T: 'a + Iterator,
| |_____________________^
|
- = note: defining type: correct_region::<'_#1r, T>
+ = note: defining type: correct_region::<'?1, T>
note: external requirements
--> $DIR/projection-no-regions-closure.rs:42:23
@@ -61,13 +61,13 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^
|
- = note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: wrong_region::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
+ extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?3)>,
(),
]
= note: number of external vids: 4
- = note: where <T as std::iter::Iterator>::Item: '_#3r
+ = note: where <T as std::iter::Iterator>::Item: '?3
note: no external requirements
--> $DIR/projection-no-regions-closure.rs:38:1
@@ -77,7 +77,7 @@ LL | | where
LL | | T: 'b + Iterator,
| |_____________________^
|
- = note: defining type: wrong_region::<'_#1r, '_#2r, T>
+ = note: defining type: wrong_region::<'?1, '?2, T>
error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:42:31
@@ -94,13 +94,13 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^
|
- = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: outlives_region::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
+ extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?3)>,
(),
]
= note: number of external vids: 4
- = note: where <T as std::iter::Iterator>::Item: '_#3r
+ = note: where <T as std::iter::Iterator>::Item: '?3
note: no external requirements
--> $DIR/projection-no-regions-closure.rs:47:1
@@ -111,7 +111,7 @@ LL | | T: 'b + Iterator,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: outlives_region::<'_#1r, '_#2r, T>
+ = note: defining type: outlives_region::<'?1, '?2, T>
error: aborting due to 2 previous errors
diff --git a/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr b/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
index 11ada59c0..986c2bd21 100644
--- a/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
@@ -4,15 +4,15 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_late::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
- = note: late-bound region is '_#3r
+ = note: late-bound region is '?3
= note: number of external vids: 4
- = note: where T: '_#2r
- = note: where '_#1r: '_#2r
+ = note: where T: '?2
+ = note: where '?1: '?2
note: no external requirements
--> $DIR/projection-one-region-closure.rs:41:1
@@ -22,7 +22,7 @@ LL | | where
LL | | T: Anything<'b>,
| |____________________^
|
- = note: defining type: no_relationships_late::<'_#1r, T>
+ = note: defining type: no_relationships_late::<'?1, T>
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/projection-one-region-closure.rs:45:39
@@ -54,14 +54,14 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_early::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where T: '_#3r
- = note: where '_#2r: '_#3r
+ = note: where T: '?3
+ = note: where '?2: '?3
note: no external requirements
--> $DIR/projection-one-region-closure.rs:51:1
@@ -72,7 +72,7 @@ LL | | T: Anything<'b>,
LL | | 'a: 'a,
| |___________^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
+ = note: defining type: no_relationships_early::<'?1, '?2, T>
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/projection-one-region-closure.rs:56:39
@@ -104,13 +104,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: projection_outlives::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where <T as Anything<'_#2r>>::AssocType: '_#3r
+ = note: where <T as Anything<'?2>>::AssocType: '?3
note: no external requirements
--> $DIR/projection-one-region-closure.rs:62:1
@@ -121,7 +121,7 @@ LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
| |_____________________^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
+ = note: defining type: projection_outlives::<'?1, '?2, T>
note: external requirements
--> $DIR/projection-one-region-closure.rs:80:29
@@ -129,14 +129,14 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: elements_outlive::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where T: '_#3r
- = note: where '_#2r: '_#3r
+ = note: where T: '?3
+ = note: where '?2: '?3
note: no external requirements
--> $DIR/projection-one-region-closure.rs:74:1
@@ -148,7 +148,7 @@ LL | | T: 'a,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
+ = note: defining type: elements_outlive::<'?1, '?2, T>
error: aborting due to 4 previous errors
diff --git a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
index 47d4f2e46..25cc60d81 100644
--- a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
@@ -4,14 +4,14 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_late::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
- = note: late-bound region is '_#3r
+ = note: late-bound region is '?3
= note: number of external vids: 4
- = note: where '_#1r: '_#2r
+ = note: where '?1: '?2
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:33:1
@@ -21,7 +21,7 @@ LL | | where
LL | | T: Anything<'b>,
| |____________________^
|
- = note: defining type: no_relationships_late::<'_#1r, T>
+ = note: defining type: no_relationships_late::<'?1, T>
error: lifetime may not live long enough
--> $DIR/projection-one-region-trait-bound-closure.rs:37:39
@@ -42,13 +42,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_early::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where '_#2r: '_#3r
+ = note: where '?2: '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:42:1
@@ -59,7 +59,7 @@ LL | | T: Anything<'b>,
LL | | 'a: 'a,
| |___________^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
+ = note: defining type: no_relationships_early::<'?1, '?2, T>
error: lifetime may not live long enough
--> $DIR/projection-one-region-trait-bound-closure.rs:47:39
@@ -80,13 +80,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: projection_outlives::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where <T as Anything<'_#2r>>::AssocType: '_#3r
+ = note: where <T as Anything<'?2>>::AssocType: '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:52:1
@@ -97,7 +97,7 @@ LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
| |_____________________^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
+ = note: defining type: projection_outlives::<'?1, '?2, T>
note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:69:29
@@ -105,13 +105,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: elements_outlive::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where '_#2r: '_#3r
+ = note: where '?2: '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:64:1
@@ -122,7 +122,7 @@ LL | | T: Anything<'b>,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
+ = note: defining type: elements_outlive::<'?1, '?2, T>
note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:81:29
@@ -130,13 +130,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: one_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
= note: number of external vids: 3
- = note: where '_#1r: '_#2r
+ = note: where '?1: '?2
note: no external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:73:1
@@ -146,7 +146,7 @@ LL | | where
LL | | T: Anything<'a>,
| |____________________^
|
- = note: defining type: one_region::<'_#1r, T>
+ = note: defining type: one_region::<'?1, T>
error: aborting due to 2 previous errors
diff --git a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
index b27186b05..5a092d7b8 100644
--- a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
@@ -4,12 +4,12 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_late::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
- = note: late-bound region is '_#3r
+ = note: late-bound region is '?3
note: no external requirements
--> $DIR/projection-one-region-trait-bound-static-closure.rs:32:1
@@ -19,7 +19,7 @@ LL | | where
LL | | T: Anything<'b>,
| |____________________^
|
- = note: defining type: no_relationships_late::<'_#1r, T>
+ = note: defining type: no_relationships_late::<'?1, T>
note: no external requirements
--> $DIR/projection-one-region-trait-bound-static-closure.rs:45:29
@@ -27,9 +27,9 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_early::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
@@ -42,7 +42,7 @@ LL | | T: Anything<'b>,
LL | | 'a: 'a,
| |___________^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
+ = note: defining type: no_relationships_early::<'?1, '?2, T>
note: no external requirements
--> $DIR/projection-one-region-trait-bound-static-closure.rs:64:29
@@ -50,9 +50,9 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: projection_outlives::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
@@ -65,7 +65,7 @@ LL | | T: Anything<'b>,
LL | | T::AssocType: 'a,
| |_____________________^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
+ = note: defining type: projection_outlives::<'?1, '?2, T>
note: no external requirements
--> $DIR/projection-one-region-trait-bound-static-closure.rs:73:29
@@ -73,9 +73,9 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: elements_outlive::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
@@ -88,7 +88,7 @@ LL | | T: Anything<'b>,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
+ = note: defining type: elements_outlive::<'?1, '?2, T>
note: no external requirements
--> $DIR/projection-one-region-trait-bound-static-closure.rs:85:29
@@ -96,9 +96,9 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: one_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
@@ -110,5 +110,5 @@ LL | | where
LL | | T: Anything<'a>,
| |____________________^
|
- = note: defining type: one_region::<'_#1r, T>
+ = note: defining type: one_region::<'?1, T>
diff --git a/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
index 530dd8681..51283aa88 100644
--- a/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
+++ b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
@@ -4,14 +4,14 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_late::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_late::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
- = note: late-bound region is '_#4r
+ = note: late-bound region is '?4
= note: number of external vids: 5
- = note: where <T as Anything<'_#1r, '_#2r>>::AssocType: '_#3r
+ = note: where <T as Anything<'?1, '?2>>::AssocType: '?3
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:34:1
@@ -21,16 +21,16 @@ LL | | where
LL | | T: Anything<'b, 'c>,
| |________________________^
|
- = note: defining type: no_relationships_late::<'_#1r, '_#2r, T>
+ = note: defining type: no_relationships_late::<'?1, '?2, T>
-error[E0309]: the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough
+error[E0309]: the associated type `<T as Anything<'?5, '?6>>::AssocType` may not live long enough
--> $DIR/projection-two-region-trait-bound-closure.rs:38:39
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^
|
- = help: consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: 'a`...
- = note: ...so that the type `<T as Anything<'_#5r, '_#6r>>::AssocType` will meet its required lifetime bounds
+ = help: consider adding an explicit lifetime bound `<T as Anything<'?5, '?6>>::AssocType: 'a`...
+ = note: ...so that the type `<T as Anything<'?5, '?6>>::AssocType` will meet its required lifetime bounds
note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:48:29
@@ -38,13 +38,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
+ = note: defining type: no_relationships_early::<'?1, '?2, '?3, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?4 ()>, T)),
(),
]
= note: number of external vids: 5
- = note: where <T as Anything<'_#2r, '_#3r>>::AssocType: '_#4r
+ = note: where <T as Anything<'?2, '?3>>::AssocType: '?4
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:43:1
@@ -55,16 +55,16 @@ LL | | T: Anything<'b, 'c>,
LL | | 'a: 'a,
| |___________^
|
- = note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>
+ = note: defining type: no_relationships_early::<'?1, '?2, '?3, T>
-error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
+error[E0309]: the associated type `<T as Anything<'?6, '?7>>::AssocType` may not live long enough
--> $DIR/projection-two-region-trait-bound-closure.rs:48:39
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^
|
- = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: 'a`...
- = note: ...so that the type `<T as Anything<'_#6r, '_#7r>>::AssocType` will meet its required lifetime bounds
+ = help: consider adding an explicit lifetime bound `<T as Anything<'?6, '?7>>::AssocType: 'a`...
+ = note: ...so that the type `<T as Anything<'?6, '?7>>::AssocType` will meet its required lifetime bounds
note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:61:29
@@ -72,13 +72,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
+ = note: defining type: projection_outlives::<'?1, '?2, '?3, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?4 ()>, T)),
(),
]
= note: number of external vids: 5
- = note: where <T as Anything<'_#2r, '_#3r>>::AssocType: '_#4r
+ = note: where <T as Anything<'?2, '?3>>::AssocType: '?4
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:53:1
@@ -89,7 +89,7 @@ LL | | T: Anything<'b, 'c>,
LL | | T::AssocType: 'a,
| |_____________________^
|
- = note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>
+ = note: defining type: projection_outlives::<'?1, '?2, '?3, T>
note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:70:29
@@ -97,13 +97,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
+ = note: defining type: elements_outlive1::<'?1, '?2, '?3, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?4 ()>, T)),
(),
]
= note: number of external vids: 5
- = note: where <T as Anything<'_#2r, '_#3r>>::AssocType: '_#4r
+ = note: where <T as Anything<'?2, '?3>>::AssocType: '?4
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:65:1
@@ -114,7 +114,7 @@ LL | | T: Anything<'b, 'c>,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>
+ = note: defining type: elements_outlive1::<'?1, '?2, '?3, T>
note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:79:29
@@ -122,13 +122,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
+ = note: defining type: elements_outlive2::<'?1, '?2, '?3, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?4 ()>, T)),
(),
]
= note: number of external vids: 5
- = note: where <T as Anything<'_#2r, '_#3r>>::AssocType: '_#4r
+ = note: where <T as Anything<'?2, '?3>>::AssocType: '?4
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:74:1
@@ -139,7 +139,7 @@ LL | | T: Anything<'b, 'c>,
LL | | 'c: 'a,
| |___________^
|
- = note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>
+ = note: defining type: elements_outlive2::<'?1, '?2, '?3, T>
note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:87:29
@@ -147,14 +147,14 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: two_regions::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: two_regions::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
- = note: late-bound region is '_#3r
+ = note: late-bound region is '?3
= note: number of external vids: 4
- = note: where <T as Anything<'_#1r, '_#1r>>::AssocType: '_#2r
+ = note: where <T as Anything<'?1, '?1>>::AssocType: '?2
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:83:1
@@ -164,7 +164,7 @@ LL | | where
LL | | T: Anything<'b, 'b>,
| |________________________^
|
- = note: defining type: two_regions::<'_#1r, T>
+ = note: defining type: two_regions::<'?1, T>
error: lifetime may not live long enough
--> $DIR/projection-two-region-trait-bound-closure.rs:87:5
@@ -178,7 +178,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
|
= help: consider adding the following bound: `'b: 'a`
- = note: requirement occurs because of the type `Cell<&'_#8r ()>`, which makes the generic argument `&'_#8r ()` invariant
+ = note: requirement occurs because of the type `Cell<&'?8 ()>`, which makes the generic argument `&'?8 ()` 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
@@ -188,13 +188,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: two_regions_outlive::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where <T as Anything<'_#2r, '_#2r>>::AssocType: '_#3r
+ = note: where <T as Anything<'?2, '?2>>::AssocType: '?3
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:92:1
@@ -205,7 +205,7 @@ LL | | T: Anything<'b, 'b>,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>
+ = note: defining type: two_regions_outlive::<'?1, '?2, T>
note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:109:29
@@ -213,13 +213,13 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^
|
- = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: one_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
= note: number of external vids: 3
- = note: where <T as Anything<'_#1r, '_#1r>>::AssocType: '_#2r
+ = note: where <T as Anything<'?1, '?1>>::AssocType: '?2
note: no external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:101:1
@@ -229,7 +229,7 @@ LL | | where
LL | | T: Anything<'a, 'a>,
| |________________________^
|
- = note: defining type: one_region::<'_#1r, T>
+ = note: defining type: one_region::<'?1, T>
error: aborting due to 3 previous errors
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
index 2c4a05975..04616f9b7 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
@@ -6,11 +6,11 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
= note: defining type: generic::<T>::{closure#0} with closure substs [
i16,
- for<Region(BrAnon(None)), Region(BrAnon(None))> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(None) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon(None) }) T)),
+ for<Region(BrAnon(None)), Region(BrAnon(None))> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(None) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon(None) }) T)),
(),
]
= note: number of external vids: 2
- = note: where T: '_#1r
+ = note: where T: '?1
note: no external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
@@ -28,12 +28,12 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
= note: defining type: generic_fail::<T>::{closure#0} with closure substs [
i16,
- for<Region(BrAnon(None)), Region(BrAnon(None))> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(None) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon(None) }) T)),
+ for<Region(BrAnon(None)), Region(BrAnon(None))> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(None) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon(None) }) T)),
(),
]
- = note: late-bound region is '_#2r
+ = note: late-bound region is '?2
= note: number of external vids: 3
- = note: where T: '_#1r
+ = note: where T: '?1
note: no external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs
index 4343c3aee..72b18c167 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs
@@ -19,8 +19,8 @@ where
// Here, the closure winds up being required to prove that `T:
// 'a`. In principle, it could know that, except that it is
// type-checked in a fully generic way, and hence it winds up with
- // a propagated requirement that `T: '_#2`, where `'_#2` appears
- // in the return type. The caller makes the mapping from `'_#2` to
+ // a propagated requirement that `T: '?2`, where `'?2` appears
+ // in the return type. The caller makes the mapping from `'?2` to
// `'a` (and subsequently reports an error).
with_signature(x, |y| y)
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
index 35979c8bf..d580774ff 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
@@ -4,13 +4,13 @@ note: external requirements
LL | with_signature(x, |y| y)
| ^^^
|
- = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: no_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>,
+ extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '?2)>,
(),
]
= note: number of external vids: 3
- = note: where T: '_#2r
+ = note: where T: '?2
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-return-type.rs:15:1
@@ -20,7 +20,7 @@ LL | | where
LL | | T: Debug,
| |_____________^
|
- = note: defining type: no_region::<'_#1r, T>
+ = note: defining type: no_region::<'?1, T>
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-return-type.rs:26:27
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
index 4c97db58c..3d4c11a3c 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
@@ -6,12 +6,12 @@ LL | with_signature(a, b, |x, y| {
|
= note: defining type: no_region::<T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?1 ()>, T)),
(),
]
- = note: late-bound region is '_#2r
+ = note: late-bound region is '?2
= note: number of external vids: 3
- = note: where T: '_#1r
+ = note: where T: '?1
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
@@ -38,13 +38,13 @@ note: external requirements
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
- = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: correct_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
= note: number of external vids: 3
- = note: where T: '_#2r
+ = note: where T: '?2
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:1
@@ -54,7 +54,7 @@ LL | | where
LL | | T: 'a,
| |__________^
|
- = note: defining type: correct_region::<'_#1r, T>
+ = note: defining type: correct_region::<'?1, T>
note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:63:26
@@ -62,14 +62,14 @@ note: external requirements
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
- = note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [
+ = note: defining type: wrong_region::<'?1, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
(),
]
- = note: late-bound region is '_#3r
+ = note: late-bound region is '?3
= note: number of external vids: 4
- = note: where T: '_#2r
+ = note: where T: '?2
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:59:1
@@ -79,7 +79,7 @@ LL | | where
LL | | T: 'b,
| |__________^
|
- = note: defining type: wrong_region::<'_#1r, T>
+ = note: defining type: wrong_region::<'?1, T>
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:65:9
@@ -98,13 +98,13 @@ note: external requirements
LL | with_signature(a, b, |x, y| {
| ^^^^^^
|
- = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ = note: defining type: outlives_region::<'?1, '?2, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
(),
]
= note: number of external vids: 4
- = note: where T: '_#3r
+ = note: where T: '?3
note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:71:1
@@ -115,7 +115,7 @@ LL | | T: 'b,
LL | | 'b: 'a,
| |___________^
|
- = note: defining type: outlives_region::<'_#1r, '_#2r, T>
+ = note: defining type: outlives_region::<'?1, '?2, T>
error: aborting due to 2 previous errors