From 804dea9ca6a02baedb1efc639b848fa080dbf51d Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Fri, 6 Jan 2023 20:55:10 +0900 Subject: [PATCH] use smaller spans for missing lifetime/generic args fix rustdoc ui test --- .../wrong_number_of_generic_args.rs | 20 ++++++--- src/test/rustdoc-ui/issue-105742.stderr | 44 +++++++++---------- src/test/ui/consts/issue-103790.stderr | 2 +- .../elided-in-expr-position.stderr | 4 +- .../gat-trait-path-missing-lifetime.stderr | 4 +- .../issue-71176.stderr | 2 +- .../issue-76535.base.stderr | 2 +- .../issue-76535.extended.stderr | 2 +- .../issue-78671.base.stderr | 2 +- .../issue-78671.extended.stderr | 2 +- .../issue-79422.base.stderr | 2 +- .../issue-79422.extended.stderr | 2 +- .../issue-79636-1.stderr | 2 +- .../issue-79636-2.stderr | 2 +- .../issue-80433.stderr | 2 +- .../issue-81712-cyclic-traits.stderr | 2 +- .../issue-81862.stderr | 2 +- .../missing_lifetime_args.stderr | 2 +- ...eric-type-less-params-with-defaults.stderr | 2 +- .../ui/generics/wrong-number-of-args.stderr | 12 ++--- .../ui/impl-trait/issues/issue-92305.stderr | 2 +- src/test/ui/issues/issue-14092.stderr | 2 +- src/test/ui/issues/issue-23024.stderr | 2 +- src/test/ui/issues/issue-86756.stderr | 2 +- .../missing-lifetime-in-alias.stderr | 2 +- src/test/ui/tag-type-args.stderr | 2 +- .../ui/type/ascription/issue-34255-1.stderr | 2 +- .../ui/ufcs/ufcs-qpath-missing-params.stderr | 4 +- 28 files changed, 70 insertions(+), 62 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs index 3df8f776ede..574b1e8b485 100644 --- a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs +++ b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs @@ -597,11 +597,15 @@ fn suggest_adding_lifetime_args(&self, err: &mut Diagnostic) { let span = self.path_segment.ident.span; // insert a suggestion of the form "Y<'a, 'b>" - let ident = self.path_segment.ident.name.to_ident_string(); - let sugg = format!("{}<{}>", ident, suggested_args); + let sugg = format!("<{}>", suggested_args); debug!("sugg: {:?}", sugg); - err.span_suggestion_verbose(span, &msg, sugg, Applicability::HasPlaceholders); + err.span_suggestion_verbose( + span.shrink_to_hi(), + &msg, + sugg, + Applicability::HasPlaceholders, + ); } AngleBrackets::Available => { @@ -643,11 +647,15 @@ fn suggest_adding_type_and_const_args(&self, err: &mut Diagnostic) { let span = self.path_segment.ident.span; // insert a suggestion of the form "Y" - let ident = self.path_segment.ident.name.to_ident_string(); - let sugg = format!("{}<{}>", ident, suggested_args); + let sugg = format!("<{}>", suggested_args); debug!("sugg: {:?}", sugg); - err.span_suggestion_verbose(span, &msg, sugg, Applicability::HasPlaceholders); + err.span_suggestion_verbose( + span.shrink_to_hi(), + &msg, + sugg, + Applicability::HasPlaceholders, + ); } AngleBrackets::Available => { let gen_args_span = self.gen_args.span().unwrap(); diff --git a/src/test/rustdoc-ui/issue-105742.stderr b/src/test/rustdoc-ui/issue-105742.stderr index cc101b7ff37..ffb602cf861 100644 --- a/src/test/rustdoc-ui/issue-105742.stderr +++ b/src/test/rustdoc-ui/issue-105742.stderr @@ -12,7 +12,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | ::Item<'a>, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:13:21 @@ -28,7 +28,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | ::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:18:37 @@ -44,7 +44,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | Output = ::Item<'a>, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:18:37 @@ -60,7 +60,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | Output = ::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:30 @@ -76,7 +76,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | Output = ::Item<'a>> as SVec>::Item, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:30 @@ -92,7 +92,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | Output = ::Item> as SVec>::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:46 @@ -108,7 +108,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | Output = ::Item> as SVec>::Item<'a>, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:46 @@ -124,7 +124,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | Output = ::Item> as SVec>::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:5:40 @@ -140,7 +140,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | pub fn next<'a, T>(s: &'a mut dyn SVec = T, Output = T>) { - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:5:40 @@ -156,7 +156,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | pub fn next<'a, T>(s: &'a mut dyn SVec = T, Output = T>) { - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:13:21 @@ -172,7 +172,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | ::Item<'a>, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:13:21 @@ -188,7 +188,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | ::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:18:37 @@ -204,7 +204,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | Output = ::Item<'a>, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:18:37 @@ -220,7 +220,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | Output = ::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:30 @@ -236,7 +236,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | Output = ::Item<'a>> as SVec>::Item, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:30 @@ -252,7 +252,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | Output = ::Item> as SVec>::Item, - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:46 @@ -268,7 +268,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | Output = ::Item> as SVec>::Item<'a>, - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:23:46 @@ -284,7 +284,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | Output = ::Item> as SVec>::Item, - | ~~~~~~~ + | +++ error[E0038]: the trait `SVec` cannot be made into an object --> $DIR/issue-105742.rs:5:31 @@ -329,7 +329,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | fn len(&self) -> ::Item<'_>; - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:35:38 @@ -345,7 +345,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | fn len(&self) -> ::Item; - | ~~~~~~~ + | +++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:35:38 @@ -361,7 +361,7 @@ LL | type Item<'a, T>; help: add missing lifetime argument | LL | fn len(&self) -> ::Item<'_>; - | ~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `SVec::Item` --> $DIR/issue-105742.rs:35:38 @@ -377,7 +377,7 @@ LL | type Item<'a, T>; help: add missing generic argument | LL | fn len(&self) -> ::Item; - | ~~~~~~~ + | +++ error: aborting due to 23 previous errors diff --git a/src/test/ui/consts/issue-103790.stderr b/src/test/ui/consts/issue-103790.stderr index 41b0816dc32..34d8ee281cf 100644 --- a/src/test/ui/consts/issue-103790.stderr +++ b/src/test/ui/consts/issue-103790.stderr @@ -20,7 +20,7 @@ LL | struct S; help: add missing generic argument | LL | struct S = { S }>; - | ~~~~ + | +++ error[E0391]: cycle detected when computing type of `S::S` --> $DIR/issue-103790.rs:4:32 diff --git a/src/test/ui/generic-associated-types/elided-in-expr-position.stderr b/src/test/ui/generic-associated-types/elided-in-expr-position.stderr index a9996123f23..842b23bd49d 100644 --- a/src/test/ui/generic-associated-types/elided-in-expr-position.stderr +++ b/src/test/ui/generic-associated-types/elided-in-expr-position.stderr @@ -12,7 +12,7 @@ LL | type Assoc<'a> where Self: 'a; help: add missing lifetime argument | LL | fn g(&self) -> Self::Assoc<'_>; - | ~~~~~~~~~ + | ++++ error[E0107]: missing generics for associated type `Trait::Assoc` --> $DIR/elided-in-expr-position.rs:31:26 @@ -28,7 +28,7 @@ LL | type Assoc<'a> where Self: 'a; help: add missing lifetime argument | LL | fn g(&self) -> Self::Assoc<'_> { - | ~~~~~~~~~ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr index 452dfefd1e3..499221637ba 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr @@ -12,7 +12,7 @@ LL | type Y<'a>; help: add missing lifetime argument | LL | fn foo<'a, T1: X = T1>>(t : T1) -> T1::Y<'a> { - | ~~~~~ + | ++++ error[E0107]: missing generics for associated type `X::Y` --> $DIR/gat-trait-path-missing-lifetime.rs:8:20 @@ -28,7 +28,7 @@ LL | type Y<'a>; help: add missing lifetime argument | LL | fn foo<'a, T1: X = T1>>(t : T1) -> T1::Y<'a> { - | ~~~~~ + | ++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/generic-associated-types/issue-71176.stderr b/src/test/ui/generic-associated-types/issue-71176.stderr index 386c97161c8..4b4fe43e8c4 100644 --- a/src/test/ui/generic-associated-types/issue-71176.stderr +++ b/src/test/ui/generic-associated-types/issue-71176.stderr @@ -12,7 +12,7 @@ LL | type A<'a>; help: add missing lifetime argument | LL | inner: Box = B>>, - | ~~~~~ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-76535.base.stderr b/src/test/ui/generic-associated-types/issue-76535.base.stderr index 088f69b09f7..52c6e3eec60 100644 --- a/src/test/ui/generic-associated-types/issue-76535.base.stderr +++ b/src/test/ui/generic-associated-types/issue-76535.base.stderr @@ -12,7 +12,7 @@ LL | type SubType<'a>: SubTrait where Self: 'a; help: add missing lifetime argument | LL | let sub: Box = SubStruct>> = Box::new(SuperStruct::new(0)); - | ~~~~~~~~~~~ + | ++++ error[E0038]: the trait `SuperTrait` cannot be made into an object --> $DIR/issue-76535.rs:39:14 diff --git a/src/test/ui/generic-associated-types/issue-76535.extended.stderr b/src/test/ui/generic-associated-types/issue-76535.extended.stderr index e79f0a73f5b..369b86d2928 100644 --- a/src/test/ui/generic-associated-types/issue-76535.extended.stderr +++ b/src/test/ui/generic-associated-types/issue-76535.extended.stderr @@ -12,7 +12,7 @@ LL | type SubType<'a>: SubTrait where Self: 'a; help: add missing lifetime argument | LL | let sub: Box = SubStruct>> = Box::new(SuperStruct::new(0)); - | ~~~~~~~~~~~ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-78671.base.stderr b/src/test/ui/generic-associated-types/issue-78671.base.stderr index 514f8d45a15..bad8c1c9dba 100644 --- a/src/test/ui/generic-associated-types/issue-78671.base.stderr +++ b/src/test/ui/generic-associated-types/issue-78671.base.stderr @@ -12,7 +12,7 @@ LL | type Member; help: add missing generic argument | LL | Box::new(Family) as &dyn CollectionFamily=usize> - | ~~~~~~~~~ + | +++ error[E0038]: the trait `CollectionFamily` cannot be made into an object --> $DIR/issue-78671.rs:10:25 diff --git a/src/test/ui/generic-associated-types/issue-78671.extended.stderr b/src/test/ui/generic-associated-types/issue-78671.extended.stderr index 6fa09a4c7e5..1d8a3d410f8 100644 --- a/src/test/ui/generic-associated-types/issue-78671.extended.stderr +++ b/src/test/ui/generic-associated-types/issue-78671.extended.stderr @@ -12,7 +12,7 @@ LL | type Member; help: add missing generic argument | LL | Box::new(Family) as &dyn CollectionFamily=usize> - | ~~~~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-79422.base.stderr b/src/test/ui/generic-associated-types/issue-79422.base.stderr index 3c1a29d48b2..f1de77bc3c0 100644 --- a/src/test/ui/generic-associated-types/issue-79422.base.stderr +++ b/src/test/ui/generic-associated-types/issue-79422.base.stderr @@ -12,7 +12,7 @@ LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a; help: add missing lifetime argument | LL | as Box = dyn RefCont<'_, u8>>>; - | ~~~~~~~~~~~~ + | ++++ error[E0038]: the trait `MapLike` cannot be made into an object --> $DIR/issue-79422.rs:47:12 diff --git a/src/test/ui/generic-associated-types/issue-79422.extended.stderr b/src/test/ui/generic-associated-types/issue-79422.extended.stderr index 58c921bf09f..d79de0ca627 100644 --- a/src/test/ui/generic-associated-types/issue-79422.extended.stderr +++ b/src/test/ui/generic-associated-types/issue-79422.extended.stderr @@ -12,7 +12,7 @@ LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a; help: add missing lifetime argument | LL | as Box = dyn RefCont<'_, u8>>>; - | ~~~~~~~~~~~~ + | ++++ error[E0271]: type mismatch resolving ` as MapLike>::VRefCont<'_> == (dyn RefCont<'_, u8> + 'static)` --> $DIR/issue-79422.rs:44:13 diff --git a/src/test/ui/generic-associated-types/issue-79636-1.stderr b/src/test/ui/generic-associated-types/issue-79636-1.stderr index 155477048ca..6e0d2ff4ded 100644 --- a/src/test/ui/generic-associated-types/issue-79636-1.stderr +++ b/src/test/ui/generic-associated-types/issue-79636-1.stderr @@ -12,7 +12,7 @@ LL | type Wrapped; help: add missing generic argument | LL | MInner: Monad = MOuter::Wrapped>, - | ~~~~~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-79636-2.stderr b/src/test/ui/generic-associated-types/issue-79636-2.stderr index 6a36bfc37f2..16287323995 100644 --- a/src/test/ui/generic-associated-types/issue-79636-2.stderr +++ b/src/test/ui/generic-associated-types/issue-79636-2.stderr @@ -12,7 +12,7 @@ LL | type Wrapped: SomeTrait; help: add missing generic argument | LL | W: SomeTrait = W>, - | ~~~~~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-80433.stderr b/src/test/ui/generic-associated-types/issue-80433.stderr index 20a407dd412..4f4f96a4b92 100644 --- a/src/test/ui/generic-associated-types/issue-80433.stderr +++ b/src/test/ui/generic-associated-types/issue-80433.stderr @@ -12,7 +12,7 @@ LL | type Output<'a>; help: add missing lifetime argument | LL | fn test_simpler<'a>(dst: &'a mut impl TestMut = &'a mut f32>) - | ~~~~~~~~~~ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr index c8961e28ede..e0fc225f463 100644 --- a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr +++ b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr @@ -12,7 +12,7 @@ LL | type DType: D; help: add missing generic argument | LL | type CType: C = Self>; - | ~~~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-81862.stderr b/src/test/ui/generic-associated-types/issue-81862.stderr index 9e21c567c73..df30be65ec5 100644 --- a/src/test/ui/generic-associated-types/issue-81862.stderr +++ b/src/test/ui/generic-associated-types/issue-81862.stderr @@ -12,7 +12,7 @@ LL | type Item<'a>; help: add missing lifetime argument | LL | fn next(&mut self) -> Option>; - | ~~~~~~~~ + | ++++ error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/missing_lifetime_args.stderr b/src/test/ui/generic-associated-types/missing_lifetime_args.stderr index 752587c25a7..8f74b12c008 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_args.stderr +++ b/src/test/ui/generic-associated-types/missing_lifetime_args.stderr @@ -12,7 +12,7 @@ LL | type Y<'a, 'b>; help: add missing lifetime arguments | LL | fn foo<'c, 'd>(_arg: Box = (&'c u32, &'d u32)>>) {} - | ~~~~~~~~~ + | ++++++++ error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied --> $DIR/missing_lifetime_args.rs:14:26 diff --git a/src/test/ui/generics/generic-type-less-params-with-defaults.stderr b/src/test/ui/generics/generic-type-less-params-with-defaults.stderr index e45a0d9ca77..6450bbd8b43 100644 --- a/src/test/ui/generics/generic-type-less-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-type-less-params-with-defaults.stderr @@ -12,7 +12,7 @@ LL | struct Vec( help: add missing generic argument | LL | let _: Vec; - | ~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/generics/wrong-number-of-args.stderr b/src/test/ui/generics/wrong-number-of-args.stderr index b48966a1a1e..75e33f680ea 100644 --- a/src/test/ui/generics/wrong-number-of-args.stderr +++ b/src/test/ui/generics/wrong-number-of-args.stderr @@ -251,7 +251,7 @@ LL | struct Ty; help: add missing generic arguments | LL | type A = Ty; - | ~~~~~~~~ + | ++++++ error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:30:14 @@ -315,7 +315,7 @@ LL | struct Ty<'a, T>; help: add missing generic argument | LL | type A = Ty; - | ~~~~~ + | +++ error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:54:14 @@ -391,7 +391,7 @@ LL | struct Ty; help: add missing generic arguments | LL | type A = Ty; - | ~~~~~~~~ + | ++++++ error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:84:14 @@ -483,7 +483,7 @@ LL | trait GenericType { help: add missing generic argument | LL | type D = Box>; - | ~~~~~~~~~~~~~~ + | +++ error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:133:22 @@ -892,7 +892,7 @@ LL | type A = HashMap; help: add missing generic arguments | LL | type A = HashMap; - | ~~~~~~~~~~~~~ + | ++++++ error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:314:18 @@ -954,7 +954,7 @@ LL | type A = Result; help: add missing generic arguments | LL | type A = Result; - | ~~~~~~~~~~~~ + | ++++++ error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:338:18 diff --git a/src/test/ui/impl-trait/issues/issue-92305.stderr b/src/test/ui/impl-trait/issues/issue-92305.stderr index f09c14d3df1..86d7184da7a 100644 --- a/src/test/ui/impl-trait/issues/issue-92305.stderr +++ b/src/test/ui/impl-trait/issues/issue-92305.stderr @@ -7,7 +7,7 @@ LL | fn f(data: &[T]) -> impl Iterator { help: add missing generic argument | LL | fn f(data: &[T]) -> impl Iterator> { - | ~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14092.stderr b/src/test/ui/issues/issue-14092.stderr index 132e2b101a5..3a43627e691 100644 --- a/src/test/ui/issues/issue-14092.stderr +++ b/src/test/ui/issues/issue-14092.stderr @@ -7,7 +7,7 @@ LL | fn fn1(0: Box) {} help: add missing generic argument | LL | fn fn1(0: Box) {} - | ~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23024.stderr b/src/test/ui/issues/issue-23024.stderr index 014eb2897b4..2c325ffccee 100644 --- a/src/test/ui/issues/issue-23024.stderr +++ b/src/test/ui/issues/issue-23024.stderr @@ -16,7 +16,7 @@ LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); help: add missing generic argument | LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); - | ~~~~~~~~ + | ++++++ error[E0191]: the value of the associated type `Output` (from trait `FnOnce`) must be specified --> $DIR/issue-23024.rs:8:39 diff --git a/src/test/ui/issues/issue-86756.stderr b/src/test/ui/issues/issue-86756.stderr index 693cfecedc4..6c5917bdf6e 100644 --- a/src/test/ui/issues/issue-86756.stderr +++ b/src/test/ui/issues/issue-86756.stderr @@ -42,7 +42,7 @@ LL | trait Foo {} help: add missing generic argument | LL | eq::> - | ~~~~~~ + | +++ error: aborting due to 3 previous errors; 1 warning emitted diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr b/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr index 428b8f14b6f..20159e14407 100644 --- a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr +++ b/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr @@ -39,7 +39,7 @@ LL | type Bar<'b> help: add missing lifetime argument | LL | type C<'a, 'b> = as Trait>::Bar<'a>; - | ~~~~~~~ + | ++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/tag-type-args.stderr b/src/test/ui/tag-type-args.stderr index 107af76413d..5b54880a685 100644 --- a/src/test/ui/tag-type-args.stderr +++ b/src/test/ui/tag-type-args.stderr @@ -12,7 +12,7 @@ LL | enum Quux { Bar } help: add missing generic argument | LL | fn foo(c: Quux) { assert!((false)); } - | ~~~~~~~ + | +++ error: aborting due to previous error diff --git a/src/test/ui/type/ascription/issue-34255-1.stderr b/src/test/ui/type/ascription/issue-34255-1.stderr index fd43e1114c8..fafff19f8f6 100644 --- a/src/test/ui/type/ascription/issue-34255-1.stderr +++ b/src/test/ui/type/ascription/issue-34255-1.stderr @@ -28,7 +28,7 @@ LL | input_cells: Vec::new() help: add missing generic argument | LL | input_cells: Vec::new() - | ~~~~~~ + | +++ error: aborting due to 3 previous errors diff --git a/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr b/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr index a832964d220..d0ec47d6132 100644 --- a/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr +++ b/src/test/ui/ufcs/ufcs-qpath-missing-params.stderr @@ -12,7 +12,7 @@ LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { help: add missing generic argument | LL | >::into_cow("foo".to_string()); - | ~~~~~~~~~~ + | +++ error[E0107]: missing generics for trait `IntoCow` --> $DIR/ufcs-qpath-missing-params.rs:17:16 @@ -28,7 +28,7 @@ LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { help: add missing generic argument | LL | >::into_cow::("foo".to_string()); - | ~~~~~~~~~~ + | +++ error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/ufcs-qpath-missing-params.rs:17:26