diff options
Diffstat (limited to '')
79 files changed, 117 insertions, 102 deletions
diff --git a/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr b/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr index d76a83b02..509863eaf 100644 --- a/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr +++ b/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr @@ -11,6 +11,6 @@ LL | S(&x) LL | } | - `x` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/regions/forall-wf-ref-reflexive.stderr b/tests/ui/regions/forall-wf-ref-reflexive.stderr index 3d059ccec..5ee7cc786 100644 --- a/tests/ui/regions/forall-wf-ref-reflexive.stderr +++ b/tests/ui/regions/forall-wf-ref-reflexive.stderr @@ -4,5 +4,5 @@ error: `T` does not live long enough LL | self_wf2::<T>(); | ^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/issue-101280.stderr b/tests/ui/regions/issue-101280.stderr index 320d008ae..48deb9949 100644 --- a/tests/ui/regions/issue-101280.stderr +++ b/tests/ui/regions/issue-101280.stderr @@ -6,9 +6,9 @@ LL | fn f<'r>(f: fn(Cell<(&'r i32, &i32)>)) -> Ty { LL | f | ^ one type is more general than the other | - = note: expected fn pointer `for<'r> fn(Cell<(&'r i32, &'r i32)>)` - found fn pointer `for<'a> fn(Cell<(&'r i32, &'a i32)>)` + = note: expected fn pointer `for<'r> fn(Cell<(&'r _, &'r _)>)` + found fn pointer `for<'a> fn(Cell<(&'r _, &'a _)>)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/issue-102374.stderr b/tests/ui/regions/issue-102374.stderr index a4230cf8b..e07dca0c7 100644 --- a/tests/ui/regions/issue-102374.stderr +++ b/tests/ui/regions/issue-102374.stderr @@ -9,6 +9,6 @@ LL | f = note: expected type `i32` found fn pointer `for<'z1, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z0> fn(Cell<(&'z1 i32, &'a i32, &'b i32, &'c i32, &'d i32, &'e i32, &'f i32, &'g i32, &'h i32, &'i i32, &'j i32, &'k i32, &'l i32, &'m i32, &'n i32, &'o i32, &'p i32, &'q i32, &'r i32, &'s i32, &'t i32, &'u i32, &'v i32, &'w i32, &'x i32, &'y i32, &'z i32, &'z0 i32)>)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/issue-102392.stderr b/tests/ui/regions/issue-102392.stderr index 56f4c0c5d..fb3373091 100644 --- a/tests/ui/regions/issue-102392.stderr +++ b/tests/ui/regions/issue-102392.stderr @@ -9,6 +9,6 @@ LL | f = note: expected type `bool` found fn pointer `for<'a> fn(for<'b> fn(&'b str, &'a str))` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/issue-12470.stderr b/tests/ui/regions/issue-12470.stderr index c97e59195..e6e629321 100644 --- a/tests/ui/regions/issue-12470.stderr +++ b/tests/ui/regions/issue-12470.stderr @@ -6,6 +6,6 @@ LL | let bb: &B = &*b; LL | make_a(bb) | ^^^^^^^^^^ returns a value referencing data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/issue-28848.stderr b/tests/ui/regions/issue-28848.stderr index a29dac4c9..058229583 100644 --- a/tests/ui/regions/issue-28848.stderr +++ b/tests/ui/regions/issue-28848.stderr @@ -10,5 +10,5 @@ LL | Foo::<'a, 'b>::xmute(u) | = help: consider adding the following bound: `'b: 'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/issue-78262.base.stderr b/tests/ui/regions/issue-78262.base.stderr index 7f232e4a7..113c84c65 100644 --- a/tests/ui/regions/issue-78262.base.stderr +++ b/tests/ui/regions/issue-78262.base.stderr @@ -9,6 +9,6 @@ LL | let f = |x: &dyn TT| x.func(); | | let's call the lifetime of this reference `'1` | `x` is a reference that is only valid in the closure body -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0521`. diff --git a/tests/ui/regions/issue-78262.polonius.stderr b/tests/ui/regions/issue-78262.polonius.stderr index 7f232e4a7..113c84c65 100644 --- a/tests/ui/regions/issue-78262.polonius.stderr +++ b/tests/ui/regions/issue-78262.polonius.stderr @@ -9,6 +9,6 @@ LL | let f = |x: &dyn TT| x.func(); | | let's call the lifetime of this reference `'1` | `x` is a reference that is only valid in the closure body -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0521`. diff --git a/tests/ui/regions/outlives-with-missing.stderr b/tests/ui/regions/outlives-with-missing.stderr index e204c9187..0e3aaaf5f 100644 --- a/tests/ui/regions/outlives-with-missing.stderr +++ b/tests/ui/regions/outlives-with-missing.stderr @@ -7,6 +7,6 @@ LL | impl<H: HandlerFamily> HandlerWrapper<H> { LL | T: Send + Sync + 'static, | ^ help: a type parameter with a similar name exists: `H` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/regions/region-bound-on-closure-outlives-call.stderr b/tests/ui/regions/region-bound-on-closure-outlives-call.stderr index ea43dde11..96d0cb80a 100644 --- a/tests/ui/regions/region-bound-on-closure-outlives-call.stderr +++ b/tests/ui/regions/region-bound-on-closure-outlives-call.stderr @@ -19,6 +19,6 @@ LL | (|x| f(x))(call_rec(f)) | | borrow occurs due to use in closure | borrow of `f` occurs here -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0505`. diff --git a/tests/ui/regions/region-invariant-static-error-reporting.stderr b/tests/ui/regions/region-invariant-static-error-reporting.stderr index 2ad39b000..834d5c6cf 100644 --- a/tests/ui/regions/region-invariant-static-error-reporting.stderr +++ b/tests/ui/regions/region-invariant-static-error-reporting.stderr @@ -16,6 +16,6 @@ LL | x.unwrap() = note: the struct `Invariant<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0521`. diff --git a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr index a9a92b7a6..d8269514b 100644 --- a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr +++ b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr @@ -6,9 +6,9 @@ LL | let _: fn(&mut &isize, &mut &isize) = a; | | | expected due to this | - = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)` - found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}` + = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b _, &'c mut &'d _)` + found fn item `for<'a, 'b> fn(&'a mut &_, &'b mut &_) {a::<'_, '_>}` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr index e96559937..e383f352b 100644 --- a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr +++ b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr @@ -6,9 +6,9 @@ LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; | | | expected due to this | - = note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b isize, &'c mut &'d isize, &'e mut &'f isize)` - found fn item `for<'a, 'b, 'c> fn(&'a mut &isize, &'b mut &isize, &'c mut &isize) {a::<'_, '_, '_>}` + = note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b _, &'c mut &'d _, &'e mut &'f _)` + found fn item `for<'a, 'b, 'c> fn(&'a mut &_, &'b mut &_, &'c mut &_) {a::<'_, '_, '_>}` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/region-object-lifetime-2.stderr b/tests/ui/regions/region-object-lifetime-2.stderr index d95289f3f..7eb5d39ec 100644 --- a/tests/ui/regions/region-object-lifetime-2.stderr +++ b/tests/ui/regions/region-object-lifetime-2.stderr @@ -10,5 +10,5 @@ LL | x.borrowed() | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/region-object-lifetime-4.stderr b/tests/ui/regions/region-object-lifetime-4.stderr index fda66a241..713252dbc 100644 --- a/tests/ui/regions/region-object-lifetime-4.stderr +++ b/tests/ui/regions/region-object-lifetime-4.stderr @@ -10,5 +10,5 @@ LL | x.borrowed() | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/region-object-lifetime-5.stderr b/tests/ui/regions/region-object-lifetime-5.stderr index b86f6e3a2..e8960fcc6 100644 --- a/tests/ui/regions/region-object-lifetime-5.stderr +++ b/tests/ui/regions/region-object-lifetime-5.stderr @@ -7,6 +7,6 @@ LL | x.borrowed() | returns a value referencing data owned by the current function | `*x` is borrowed here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-addr-of-self.stderr b/tests/ui/regions/regions-addr-of-self.stderr index 3d7aac74b..75e1abdda 100644 --- a/tests/ui/regions/regions-addr-of-self.stderr +++ b/tests/ui/regions/regions-addr-of-self.stderr @@ -6,5 +6,5 @@ LL | pub fn chase_cat(&mut self) { LL | let p: &'static mut usize = &mut self.cats_chased; | ^^^^^^^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr b/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr index 2a2625203..2a5831aad 100644 --- a/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr +++ b/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr @@ -11,5 +11,5 @@ LL | let _: &'a WithAssoc<TheType<'b>> = loop { }; | = help: consider adding the following bound: `'b: 'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr b/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr index a96f5612f..6ffe416ca 100644 --- a/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr +++ b/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr @@ -10,6 +10,6 @@ note: type must satisfy the static lifetime as required by this binding LL | type Value: 'static; | ^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0477`. diff --git a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr index 6193bf02f..bd8640b9d 100644 --- a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr +++ b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr @@ -14,5 +14,5 @@ LL | a.bigger_region(b) = note: the struct `Inv<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr b/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr index 0e0086be9..df37df99b 100644 --- a/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr +++ b/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr @@ -14,5 +14,5 @@ LL | f.method(b); = note: the struct `Inv<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-bounded-method-type-parameters.stderr b/tests/ui/regions/regions-bounded-method-type-parameters.stderr index b6d7b8aac..f13754044 100644 --- a/tests/ui/regions/regions-bounded-method-type-parameters.stderr +++ b/tests/ui/regions/regions-bounded-method-type-parameters.stderr @@ -6,5 +6,5 @@ LL | fn caller<'a>(x: &isize) { LL | Foo.some_method::<&'a isize>(); | ^^^^^^^^^^^ requires that `'a` must outlive `'static` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-close-object-into-object-1.stderr b/tests/ui/regions/regions-close-object-into-object-1.stderr index 5bfaeb295..8353587c6 100644 --- a/tests/ui/regions/regions-close-object-into-object-1.stderr +++ b/tests/ui/regions/regions-close-object-into-object-1.stderr @@ -7,6 +7,6 @@ LL | Box::new(B(&*v)) as Box<X> | | `*v` is borrowed here | returns a value referencing data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-close-object-into-object-3.stderr b/tests/ui/regions/regions-close-object-into-object-3.stderr index 9f92c40e1..706595ae8 100644 --- a/tests/ui/regions/regions-close-object-into-object-3.stderr +++ b/tests/ui/regions/regions-close-object-into-object-3.stderr @@ -7,6 +7,6 @@ LL | Box::new(B(&*v)) as Box<X> | | `*v` is borrowed here | returns a value referencing data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr b/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr index baa0506d0..a353ff89b 100644 --- a/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr +++ b/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr @@ -11,5 +11,5 @@ LL | Box::new(v) as Box<dyn SomeTrait + 'a> | = help: consider adding the following bound: `'a: 'c` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-creating-enums3.stderr b/tests/ui/regions/regions-creating-enums3.stderr index 41d609b56..93a0a1dc7 100644 --- a/tests/ui/regions/regions-creating-enums3.stderr +++ b/tests/ui/regions/regions-creating-enums3.stderr @@ -10,5 +10,5 @@ LL | Ast::Add(x, y) | = help: consider adding the following bound: `'b: 'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-creating-enums4.stderr b/tests/ui/regions/regions-creating-enums4.stderr index 91cf57e09..fee2b7779 100644 --- a/tests/ui/regions/regions-creating-enums4.stderr +++ b/tests/ui/regions/regions-creating-enums4.stderr @@ -10,5 +10,5 @@ LL | Ast::Add(x, y) | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-early-bound-error-method.stderr b/tests/ui/regions/regions-early-bound-error-method.stderr index a7746d898..8c79eb222 100644 --- a/tests/ui/regions/regions-early-bound-error-method.stderr +++ b/tests/ui/regions/regions-early-bound-error-method.stderr @@ -10,5 +10,5 @@ LL | g2.get() | = help: consider adding the following bound: `'b: 'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-early-bound-error.stderr b/tests/ui/regions/regions-early-bound-error.stderr index eb4cd5ca7..5ad16069a 100644 --- a/tests/ui/regions/regions-early-bound-error.stderr +++ b/tests/ui/regions/regions-early-bound-error.stderr @@ -10,5 +10,5 @@ LL | g1.get() | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-escape-method.stderr b/tests/ui/regions/regions-escape-method.stderr index 9f425125b..aeda923b0 100644 --- a/tests/ui/regions/regions-escape-method.stderr +++ b/tests/ui/regions/regions-escape-method.stderr @@ -7,5 +7,5 @@ LL | s.f(|p| p) | |return type of closure is &'2 i32 | has type `&'1 i32` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-escape-via-trait-or-not.stderr b/tests/ui/regions/regions-escape-via-trait-or-not.stderr index cae6c33ac..4d185e52d 100644 --- a/tests/ui/regions/regions-escape-via-trait-or-not.stderr +++ b/tests/ui/regions/regions-escape-via-trait-or-not.stderr @@ -7,5 +7,5 @@ LL | with(|o| o) | |return type of closure is &'2 isize | has type `&'1 isize` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr index 8d82ff958..2ccdd65f2 100644 --- a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr +++ b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr @@ -14,6 +14,6 @@ note: function defined here LL | fn want_G(f: G) {} | ^^^^^^ ---- -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/regions-free-region-ordering-callee-4.stderr b/tests/ui/regions/regions-free-region-ordering-callee-4.stderr index 1df7ca0e3..1c8f1c1e4 100644 --- a/tests/ui/regions/regions-free-region-ordering-callee-4.stderr +++ b/tests/ui/regions/regions-free-region-ordering-callee-4.stderr @@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her LL | fn ordering4<'a, 'b, F>(a: &'a usize, b: &'b usize, x: F) where F: FnOnce(&'a &'b usize) { | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0491`. diff --git a/tests/ui/regions/regions-free-region-ordering-incorrect.stderr b/tests/ui/regions/regions-free-region-ordering-incorrect.stderr index d0ceaec3b..9025f0c3c 100644 --- a/tests/ui/regions/regions-free-region-ordering-incorrect.stderr +++ b/tests/ui/regions/regions-free-region-ordering-incorrect.stderr @@ -13,5 +13,5 @@ LL | | } | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-glb-free-free.stderr b/tests/ui/regions/regions-glb-free-free.stderr index 575037a0a..727669f26 100644 --- a/tests/ui/regions/regions-glb-free-free.stderr +++ b/tests/ui/regions/regions-glb-free-free.stderr @@ -11,6 +11,6 @@ LL | | value: self.value LL | | } | |_____________^ lifetime `'a` required -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0621`. diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr index 8c1791fc1..7d9f9121a 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr @@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound LL | fn func<'x, T:Trait1<'x> + 'x>(t: &'x T::Foo) | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0309`. diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr index 6844e8665..1555e5981 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr @@ -9,6 +9,6 @@ help: consider restricting type parameter `T` LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >) | ++++++++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/regions/regions-in-enums-anon.stderr b/tests/ui/regions/regions-in-enums-anon.stderr index ed547aa9c..86a6d33d6 100644 --- a/tests/ui/regions/regions-in-enums-anon.stderr +++ b/tests/ui/regions/regions-in-enums-anon.stderr @@ -10,6 +10,6 @@ LL ~ enum Foo<'a> { LL ~ Bar(&'a isize) | -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0106`. diff --git a/tests/ui/regions/regions-in-structs-anon.stderr b/tests/ui/regions/regions-in-structs-anon.stderr index 992d25c9f..2679ef93b 100644 --- a/tests/ui/regions/regions-in-structs-anon.stderr +++ b/tests/ui/regions/regions-in-structs-anon.stderr @@ -10,6 +10,6 @@ LL ~ struct Foo<'a> { LL ~ x: &'a isize | -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0106`. diff --git a/tests/ui/regions/regions-infer-at-fn-not-param.stderr b/tests/ui/regions/regions-infer-at-fn-not-param.stderr index 8cfc44f6a..4c7660276 100644 --- a/tests/ui/regions/regions-infer-at-fn-not-param.stderr +++ b/tests/ui/regions/regions-infer-at-fn-not-param.stderr @@ -6,6 +6,6 @@ LL | fn take1<'a>(p: Parameterized1) -> Parameterized1<'a> { p } | | | help: add explicit lifetime `'a` to the type of `p`: `Parameterized1<'a>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0621`. diff --git a/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr b/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr index 2c7a6e8b5..15dc1cef8 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr +++ b/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr @@ -7,6 +7,6 @@ LL | assert_eq!(*xc, 3); LL | return xc; | ^^ returns a value referencing data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-infer-bound-from-trait-self.stderr b/tests/ui/regions/regions-infer-bound-from-trait-self.stderr index d0c4b9a57..7bf112dc7 100644 --- a/tests/ui/regions/regions-infer-bound-from-trait-self.stderr +++ b/tests/ui/regions/regions-infer-bound-from-trait-self.stderr @@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound LL | trait InheritsFromNothing<'a> : Sized where Self: 'a { | ++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0309`. diff --git a/tests/ui/regions/regions-infer-call-3.stderr b/tests/ui/regions/regions-infer-call-3.stderr index ca51555a0..14d1ce7ae 100644 --- a/tests/ui/regions/regions-infer-call-3.stderr +++ b/tests/ui/regions/regions-infer-call-3.stderr @@ -7,5 +7,5 @@ LL | let z = with(|y| { select(x, y) }); | |return type of closure is &'2 isize | has type `&'1 isize` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr b/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr index 94b80852d..56ee07bde 100644 --- a/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr +++ b/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr @@ -11,5 +11,5 @@ LL | let _: Contravariant<'long> = c; | = help: consider adding the following bound: `'short: 'long` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr b/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr index f44a0fad5..013475c26 100644 --- a/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr +++ b/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr @@ -11,5 +11,5 @@ LL | let _: Covariant<'short> = c; | = help: consider adding the following bound: `'short: 'long` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr b/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr index c8c7808e0..2b17f74ad 100644 --- a/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr +++ b/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr @@ -10,5 +10,5 @@ LL | b_isize = note: the struct `Invariant<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr b/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr index 1165011c1..9cb9dac4f 100644 --- a/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr +++ b/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr @@ -10,5 +10,5 @@ LL | b_isize = note: the struct `Invariant<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr b/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr index f3973a93b..098a9c11d 100644 --- a/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr +++ b/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr @@ -10,5 +10,5 @@ LL | b_isize = note: the struct `Invariant<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-paramd-indirect.stderr b/tests/ui/regions/regions-infer-paramd-indirect.stderr index afabdc1de..4a1cd1119 100644 --- a/tests/ui/regions/regions-infer-paramd-indirect.stderr +++ b/tests/ui/regions/regions-infer-paramd-indirect.stderr @@ -9,5 +9,5 @@ LL | fn set_f_bad(&mut self, b: Box<B>) { LL | self.f = b; | ^^^^^^ assignment requires that `'1` must outlive `'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-infer-proc-static-upvar.stderr b/tests/ui/regions/regions-infer-proc-static-upvar.stderr index c8a33bbc5..919fcffdc 100644 --- a/tests/ui/regions/regions-infer-proc-static-upvar.stderr +++ b/tests/ui/regions/regions-infer-proc-static-upvar.stderr @@ -12,6 +12,6 @@ LL | | }); LL | } | - `x` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr index 53a5612d2..989e91c70 100644 --- a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr +++ b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr @@ -6,9 +6,9 @@ LL | let _: fn(&mut &isize, &mut &isize) = a; | | | expected due to this | - = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)` - found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}` + = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b _, &'c mut &'d _)` + found fn item `for<'a, 'b> fn(&'a mut &_, &'b mut &_) {a::<'_, '_>}` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs index b6a89e29e..2c455fc35 100644 --- a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs +++ b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs @@ -3,9 +3,6 @@ // This test verifies that temporary lifetime is correctly computed // for static objects in enclosing scopes. - -use std::cmp::PartialEq; - fn f<T:PartialEq+std::fmt::Debug>(o: &mut Option<T>) { assert_eq!(*o, None); } diff --git a/tests/ui/regions/regions-name-duplicated.stderr b/tests/ui/regions/regions-name-duplicated.stderr index cef73c18d..8b0cc925a 100644 --- a/tests/ui/regions/regions-name-duplicated.stderr +++ b/tests/ui/regions/regions-name-duplicated.stderr @@ -6,6 +6,6 @@ LL | struct Foo<'a, 'a> { | | | first use of `'a` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0403`. diff --git a/tests/ui/regions/regions-name-static.stderr b/tests/ui/regions/regions-name-static.stderr index 4b7026e65..6d334b498 100644 --- a/tests/ui/regions/regions-name-static.stderr +++ b/tests/ui/regions/regions-name-static.stderr @@ -4,6 +4,6 @@ error[E0262]: invalid lifetime parameter name: `'static` LL | struct Foo<'static> { | ^^^^^^^ 'static is a reserved lifetime name -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0262`. diff --git a/tests/ui/regions/regions-nested-fns-2.stderr b/tests/ui/regions/regions-nested-fns-2.stderr index 43c8d1272..254497639 100644 --- a/tests/ui/regions/regions-nested-fns-2.stderr +++ b/tests/ui/regions/regions-nested-fns-2.stderr @@ -12,6 +12,6 @@ LL | if false { &y } else { z } LL | } | - `y` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/regions/regions-normalize-in-where-clause-list.stderr b/tests/ui/regions/regions-normalize-in-where-clause-list.stderr index 567283729..2e76333e2 100644 --- a/tests/ui/regions/regions-normalize-in-where-clause-list.stderr +++ b/tests/ui/regions/regions-normalize-in-where-clause-list.stderr @@ -22,6 +22,6 @@ LL | fn bar<'a, 'b>() = note: expected `Project<'a, 'b>` found `Project<'_, '_>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0495`. diff --git a/tests/ui/regions/regions-outlives-projection-container-wc.stderr b/tests/ui/regions/regions-outlives-projection-container-wc.stderr index eba2a0d58..1c270d6c3 100644 --- a/tests/ui/regions/regions-outlives-projection-container-wc.stderr +++ b/tests/ui/regions/regions-outlives-projection-container-wc.stderr @@ -11,5 +11,5 @@ LL | let _: &'a WithAssoc<TheType<'b>> = loop { }; | = help: consider adding the following bound: `'b: 'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-pattern-typing-issue-19552.stderr b/tests/ui/regions/regions-pattern-typing-issue-19552.stderr index 18aec29ad..1d3d5e831 100644 --- a/tests/ui/regions/regions-pattern-typing-issue-19552.stderr +++ b/tests/ui/regions/regions-pattern-typing-issue-19552.stderr @@ -11,6 +11,6 @@ LL | } LL | } | - `line` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/regions/regions-pattern-typing-issue-19997.stderr b/tests/ui/regions/regions-pattern-typing-issue-19997.stderr index 0abe77a86..b2f63b3b8 100644 --- a/tests/ui/regions/regions-pattern-typing-issue-19997.stderr +++ b/tests/ui/regions/regions-pattern-typing-issue-19997.stderr @@ -9,6 +9,6 @@ LL | a1 = &f; LL | drop(b0); | -- borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0506`. diff --git a/tests/ui/regions/regions-proc-bound-capture.stderr b/tests/ui/regions/regions-proc-bound-capture.stderr index 60c5246e2..3fe497bf2 100644 --- a/tests/ui/regions/regions-proc-bound-capture.stderr +++ b/tests/ui/regions/regions-proc-bound-capture.stderr @@ -16,5 +16,5 @@ help: alternatively, add an explicit `'static` bound to this reference LL | fn static_proc(x: &'static isize) -> Box<dyn FnMut() -> (isize) + 'static> { | ~~~~~~~~~~~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr index dc905d076..40d4f1652 100644 --- a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr +++ b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr @@ -10,5 +10,5 @@ LL | &mut ***p | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr index c98ec4774..fd23fce76 100644 --- a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr +++ b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr @@ -10,5 +10,5 @@ LL | &mut **p | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-ret-borrowed-1.stderr b/tests/ui/regions/regions-ret-borrowed-1.stderr index 0784e894e..4ad526602 100644 --- a/tests/ui/regions/regions-ret-borrowed-1.stderr +++ b/tests/ui/regions/regions-ret-borrowed-1.stderr @@ -7,5 +7,5 @@ LL | with(|o| o) | |return type of closure is &'2 isize | has type `&'1 isize` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-ret-borrowed.stderr b/tests/ui/regions/regions-ret-borrowed.stderr index d9be5ef89..f16a4a2e8 100644 --- a/tests/ui/regions/regions-ret-borrowed.stderr +++ b/tests/ui/regions/regions-ret-borrowed.stderr @@ -7,5 +7,5 @@ LL | with(|o| o) | |return type of closure is &'2 isize | has type `&'1 isize` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-ret.stderr b/tests/ui/regions/regions-ret.stderr index 0e4875ac9..470b6ab06 100644 --- a/tests/ui/regions/regions-ret.stderr +++ b/tests/ui/regions/regions-ret.stderr @@ -7,6 +7,6 @@ LL | return &id(3); | |temporary value created here | returns a reference to data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr b/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr index b087e03b4..be9ffbe8d 100644 --- a/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr +++ b/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr @@ -13,5 +13,5 @@ LL | let mut f = || &mut x; = note: `FnMut` closures only have access to their captured variables while they are executing... = note: ...therefore, they cannot allow references to captured variables to escape -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-return-stack-allocated-vec.stderr b/tests/ui/regions/regions-return-stack-allocated-vec.stderr index 9d87fe266..68631c74e 100644 --- a/tests/ui/regions/regions-return-stack-allocated-vec.stderr +++ b/tests/ui/regions/regions-return-stack-allocated-vec.stderr @@ -7,6 +7,6 @@ LL | &[x] | |temporary value created here | returns a reference to data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-steal-closure.stderr b/tests/ui/regions/regions-steal-closure.stderr index 5b0efaf95..9324eb892 100644 --- a/tests/ui/regions/regions-steal-closure.stderr +++ b/tests/ui/regions/regions-steal-closure.stderr @@ -11,6 +11,6 @@ LL | box_it(Box::new(|| i += 1)) LL | }; | - `i` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/regions/regions-trait-variance.stderr b/tests/ui/regions/regions-trait-variance.stderr index 56c9f89e1..235950c2e 100644 --- a/tests/ui/regions/regions-trait-variance.stderr +++ b/tests/ui/regions/regions-trait-variance.stderr @@ -6,6 +6,6 @@ LL | let bb: &B = &*b; LL | make_a(bb) | ^^^^^^^^^^ returns a value referencing data owned by the current function -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0515`. diff --git a/tests/ui/regions/regions-var-type-out-of-scope.stderr b/tests/ui/regions/regions-var-type-out-of-scope.stderr index c32bbe0ee..b261f5a41 100644 --- a/tests/ui/regions/regions-var-type-out-of-scope.stderr +++ b/tests/ui/regions/regions-var-type-out-of-scope.stderr @@ -10,6 +10,6 @@ LL | assert_eq!(*x, 3); | = note: consider using a `let` binding to create a longer lived value -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0716`. diff --git a/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr b/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr index 5352be430..5e952ee57 100644 --- a/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr +++ b/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr @@ -11,5 +11,5 @@ LL | let _: S<'long, 'long> = c; | = help: consider adding the following bound: `'short: 'long` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr b/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr index 22c9b915b..bb96bf597 100644 --- a/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr +++ b/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr @@ -11,5 +11,5 @@ LL | let _: Contravariant<'long> = c; | = help: consider adding the following bound: `'short: 'long` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr b/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr index a07181ad5..b544bf5ec 100644 --- a/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr +++ b/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr @@ -11,5 +11,5 @@ LL | let _: Covariant<'short> = c; | = help: consider adding the following bound: `'short: 'long` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr b/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr index b35a2cb90..4695045bb 100644 --- a/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr +++ b/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr @@ -14,5 +14,5 @@ LL | let _: Invariant<'short> = c; = note: the struct `Invariant<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-variance-invariant-use-covariant.stderr b/tests/ui/regions/regions-variance-invariant-use-covariant.stderr index 761e78d17..5945f9ba1 100644 --- a/tests/ui/regions/regions-variance-invariant-use-covariant.stderr +++ b/tests/ui/regions/regions-variance-invariant-use-covariant.stderr @@ -11,5 +11,5 @@ LL | let _: Invariant<'static> = c; = note: the struct `Invariant<'a>` is invariant over the parameter `'a` = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/regions/regions-wf-trait-object.stderr b/tests/ui/regions/regions-wf-trait-object.stderr index f6006ca04..209961508 100644 --- a/tests/ui/regions/regions-wf-trait-object.stderr +++ b/tests/ui/regions/regions-wf-trait-object.stderr @@ -15,6 +15,6 @@ note: but lifetime parameter must outlive the lifetime `'a` as defined here LL | struct Foo<'a,'b> { | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0478`. diff --git a/tests/ui/regions/resolve-re-error-ice.rs b/tests/ui/regions/resolve-re-error-ice.rs index f37b27a82..bf6defb9b 100644 --- a/tests/ui/regions/resolve-re-error-ice.rs +++ b/tests/ui/regions/resolve-re-error-ice.rs @@ -1,8 +1,3 @@ -// check-pass - -// Allow this for now, can remove this UI test when this becomes a hard error. -#![allow(implied_bounds_entailment)] - use std::collections::hash_map::{Keys, HashMap}; use std::marker::PhantomData; @@ -15,6 +10,7 @@ struct Subject<'a, T, V, R>(PhantomData<(&'a T, V, R)>); impl<'a, K, V, R> MapAssertion<'a, K, V, R> for Subject<'a, HashMap<K, V>, (), R> { fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> { + //~^ ERROR cannot infer an appropriate lifetime for lifetime parameter '_ in generic type due to conflicting requirements todo!() } } 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`. |