summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/resolve-re-error-ice.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/regions/resolve-re-error-ice.stderr
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/regions/resolve-re-error-ice.stderr')
-rw-r--r--tests/ui/regions/resolve-re-error-ice.stderr42
1 files changed, 32 insertions, 10 deletions
diff --git a/tests/ui/regions/resolve-re-error-ice.stderr b/tests/ui/regions/resolve-re-error-ice.stderr
index e7003e1c3..41c5f0fa9 100644
--- a/tests/ui/regions/resolve-re-error-ice.stderr
+++ b/tests/ui/regions/resolve-re-error-ice.stderr
@@ -1,15 +1,37 @@
-Future incompatibility report: Future breakage diagnostic:
-warning: impl method assumes more implied bounds than the corresponding trait method
- --> $DIR/resolve-re-error-ice.rs:17:16
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter '_ in generic type due to conflicting requirements
+ --> $DIR/resolve-re-error-ice.rs:12:5
|
LL | fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
- | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `Subject<'_, std::collections::hash_map::Keys<'_, K, V>, (), R>`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #105572 <https://github.com/rust-lang/rust/issues/105572>
-note: the lint level is defined here
- --> $DIR/resolve-re-error-ice.rs:4:10
+note: first, the lifetime cannot outlive the anonymous lifetime defined here...
+ --> $DIR/resolve-re-error-ice.rs:5:16
|
-LL | #![allow(implied_bounds_entailment)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn key_set(&self) -> Subject<Keys<K, V>, (), R>;
+ | ^^^^^
+note: ...so that the method type is compatible with trait
+ --> $DIR/resolve-re-error-ice.rs:12:5
+ |
+LL | fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = note: expected `fn(&Subject<'_, _, _, _>) -> Subject<'_, std::collections::hash_map::Keys<'_, _, _>, _, _>`
+ found `fn(&Subject<'_, _, _, _>) -> Subject<'a, std::collections::hash_map::Keys<'_, _, _>, _, _>`
+note: but, the lifetime must be valid for the lifetime `'a` as defined here...
+ --> $DIR/resolve-re-error-ice.rs:10:6
+ |
+LL | impl<'a, K, V, R> MapAssertion<'a, K, V, R> for Subject<'a, HashMap<K, V>, (), R>
+ | ^^
+note: ...so that the type `std::collections::hash_map::Keys<'_, K, V>` will meet its required lifetime bounds...
+ --> $DIR/resolve-re-error-ice.rs:12:5
+ |
+LL | fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...that is required by this bound
+ --> $DIR/resolve-re-error-ice.rs:8:29
+ |
+LL | struct Subject<'a, T, V, R>(PhantomData<(&'a T, V, R)>);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+For more information about this error, try `rustc --explain E0495`.