diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr')
-rw-r--r-- | tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr new file mode 100644 index 000000000..4933b9348 --- /dev/null +++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -0,0 +1,118 @@ +note: external requirements + --> $DIR/projection-no-regions-closure.rs:25:23 + | +LL | with_signature(x, |mut y| Box::new(y.next())) + | ^^^^^^^ + | + = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>, + (), + ] + = note: number of external vids: 3 + = note: where <T as std::iter::Iterator>::Item: '_#2r + +note: no external requirements + --> $DIR/projection-no-regions-closure.rs:21:1 + | +LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> +LL | | where +LL | | T: Iterator, + | |________________^ + | + = note: defining type: no_region::<'_#1r, T> + +error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough + --> $DIR/projection-no-regions-closure.rs:25:31 + | +LL | with_signature(x, |mut y| Box::new(y.next())) + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `<T as Iterator>::Item: 'a`... + = note: ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds + +note: external requirements + --> $DIR/projection-no-regions-closure.rs:34:23 + | +LL | with_signature(x, |mut y| Box::new(y.next())) + | ^^^^^^^ + | + = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>, + (), + ] + = note: number of external vids: 3 + = note: where <T as std::iter::Iterator>::Item: '_#2r + +note: no external requirements + --> $DIR/projection-no-regions-closure.rs:30:1 + | +LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> +LL | | where +LL | | T: 'a + Iterator, + | |_____________________^ + | + = note: defining type: correct_region::<'_#1r, T> + +note: external requirements + --> $DIR/projection-no-regions-closure.rs:42:23 + | +LL | with_signature(x, |mut y| Box::new(y.next())) + | ^^^^^^^ + | + = note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>, + (), + ] + = note: number of external vids: 4 + = note: where <T as std::iter::Iterator>::Item: '_#3r + +note: no external requirements + --> $DIR/projection-no-regions-closure.rs:38:1 + | +LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> +LL | | where +LL | | T: 'b + Iterator, + | |_____________________^ + | + = note: defining type: wrong_region::<'_#1r, '_#2r, T> + +error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough + --> $DIR/projection-no-regions-closure.rs:42:31 + | +LL | with_signature(x, |mut y| Box::new(y.next())) + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `<T as Iterator>::Item: 'a`... + = note: ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds + +note: external requirements + --> $DIR/projection-no-regions-closure.rs:52:23 + | +LL | with_signature(x, |mut y| Box::new(y.next())) + | ^^^^^^^ + | + = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>, + (), + ] + = note: number of external vids: 4 + = note: where <T as std::iter::Iterator>::Item: '_#3r + +note: no external requirements + --> $DIR/projection-no-regions-closure.rs:47:1 + | +LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> +LL | | where +LL | | T: 'b + Iterator, +LL | | 'b: 'a, + | |___________^ + | + = note: defining type: outlives_region::<'_#1r, '_#2r, T> + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0309`. |