diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:42 +0000 |
commit | cec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch) | |
tree | 47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr | |
parent | Adding debian version 1.74.1+dfsg1-1. (diff) | |
download | rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr')
-rw-r--r-- | tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr index e0ff544fe..da76ac1c4 100644 --- a/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr +++ b/tests/ui/nll/ty-outlives/projection-no-regions-fn.stderr @@ -1,20 +1,30 @@ error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:13:5 | +LL | fn no_region<'a, T>(mut x: T) -> Box<dyn Anything + 'a> + | -- the associated type `<T as Iterator>::Item` must be valid for the lifetime `'a` as defined here... +... LL | Box::new(x.next()) - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^ ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds | - = 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 +help: consider adding an explicit lifetime bound + | +LL | T: Iterator, <T as Iterator>::Item: 'a + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:28:5 | +LL | fn wrong_region<'a, 'b, T>(mut x: T) -> Box<dyn Anything + 'a> + | -- the associated type `<T as Iterator>::Item` must be valid for the lifetime `'a` as defined here... +... LL | Box::new(x.next()) - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^ ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds + | +help: consider adding an explicit lifetime bound | - = 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 +LL | T: 'b + Iterator, <T as Iterator>::Item: 'a + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors |