From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- ...rojection-one-region-trait-bound-closure.stderr | 169 +++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr (limited to 'src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr') 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 new file mode 100644 index 000000000..45e61bcbd --- /dev/null +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -0,0 +1,169 @@ +note: external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:37:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^ + | + = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), + (), + ] + = note: late-bound region is '_#3r + = note: number of external vids: 4 + = note: where '_#1r: '_#2r + +note: no external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:33:1 + | +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> + +error: lifetime may not live long enough + --> $DIR/projection-one-region-trait-bound-closure.rs:37:39 + | +LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +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: external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:47:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^ + | + = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), + (), + ] + = note: number of external vids: 4 + = note: where '_#2r: '_#3r + +note: no external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:42:1 + | +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> + +error: lifetime may not live long enough + --> $DIR/projection-one-region-trait-bound-closure.rs:47:39 + | +LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +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: external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:60:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^ + | + = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), + (), + ] + = note: number of external vids: 4 + = note: where >::AssocType: '_#3r + +note: no external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:52:1 + | +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> + +note: external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:69:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^ + | + = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), + (), + ] + = note: number of external vids: 4 + = note: where '_#2r: '_#3r + +note: no external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:64:1 + | +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> + +note: external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:81:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^ + | + = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [ + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), + (), + ] + = note: number of external vids: 3 + = note: where '_#1r: '_#2r + +note: no external requirements + --> $DIR/projection-one-region-trait-bound-closure.rs:73:1 + | +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> + +error: aborting due to 2 previous errors + -- cgit v1.2.3