summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/resolve-re-error-ice.stderr
diff options
context:
space:
mode:
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`.