From 2ea468e386230375229c68a09affcba23cd79487 Mon Sep 17 00:00:00 2001 From: lcnr Date: Fri, 3 Jun 2022 20:00:39 +0200 Subject: dedup diagnostics default params handling --- src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs | 4 ++-- src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr | 8 ++++---- src/test/ui/const-generics/defaults/trait_objects_fail.rs | 2 +- src/test/ui/const-generics/defaults/trait_objects_fail.stderr | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs index 308c121a941..f633e56b0ec 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs +++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs @@ -15,12 +15,12 @@ impl Traitor<1, 2> for u64 {} fn uwu() -> impl Traitor { - //~^ error: the trait bound `u32: Traitor` is not satisfied + //~^ error: the trait bound `u32: Traitor` is not satisfied 1_u32 } fn owo() -> impl Traitor { - //~^ error: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied + //~^ error: the trait bound `u64: Traitor` is not satisfied 1_u64 } diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr index 8031da28ca1..cbe4a4ac0d6 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr +++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr @@ -6,21 +6,21 @@ LL | fn rawr() -> impl Trait { | = help: the trait `Trait` is implemented for `Uwu` -error[E0277]: the trait bound `u32: Traitor` is not satisfied +error[E0277]: the trait bound `u32: Traitor` is not satisfied --> $DIR/rp_impl_trait_fail.rs:17:26 | LL | fn uwu() -> impl Traitor { - | ^^^^^^^^^^^^^^^ the trait `Traitor` is not implemented for `u32` + | ^^^^^^^^^^^^^^^ the trait `Traitor` is not implemented for `u32` | = help: the following other types implement trait `Traitor`: > > -error[E0277]: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied +error[E0277]: the trait bound `u64: Traitor` is not satisfied --> $DIR/rp_impl_trait_fail.rs:22:13 | LL | fn owo() -> impl Traitor { - | ^^^^^^^^^^^^ the trait `Traitor<1_u8, 1_u8>` is not implemented for `u64` + | ^^^^^^^^^^^^ the trait `Traitor` is not implemented for `u64` | = help: the following other types implement trait `Traitor`: > diff --git a/src/test/ui/const-generics/defaults/trait_objects_fail.rs b/src/test/ui/const-generics/defaults/trait_objects_fail.rs index 7ba12d02b6e..5e779d2e8de 100644 --- a/src/test/ui/const-generics/defaults/trait_objects_fail.rs +++ b/src/test/ui/const-generics/defaults/trait_objects_fail.rs @@ -26,5 +26,5 @@ fn main() { foo(&10_u32); //~^ error: the trait bound `u32: Trait` is not satisfied bar(&true); - //~^ error: the trait bound `bool: Traitor<{_: u8}, {_: u8}>` is not satisfied + //~^ error: the trait bound `bool: Traitor<{_: u8}>` is not satisfied } diff --git a/src/test/ui/const-generics/defaults/trait_objects_fail.stderr b/src/test/ui/const-generics/defaults/trait_objects_fail.stderr index 7f8a1f742d8..60dc96f675a 100644 --- a/src/test/ui/const-generics/defaults/trait_objects_fail.stderr +++ b/src/test/ui/const-generics/defaults/trait_objects_fail.stderr @@ -9,16 +9,16 @@ LL | foo(&10_u32); = help: the trait `Trait<2_u8>` is implemented for `u32` = note: required for the cast to the object type `dyn Trait` -error[E0277]: the trait bound `bool: Traitor<{_: u8}, {_: u8}>` is not satisfied +error[E0277]: the trait bound `bool: Traitor<{_: u8}>` is not satisfied --> $DIR/trait_objects_fail.rs:28:9 | LL | bar(&true); - | --- ^^^^^ the trait `Traitor<{_: u8}, {_: u8}>` is not implemented for `bool` + | --- ^^^^^ the trait `Traitor<{_: u8}>` is not implemented for `bool` | | | required by a bound introduced by this call | = help: the trait `Traitor<2_u8, 3_u8>` is implemented for `bool` - = note: required for the cast to the object type `dyn Traitor<{_: u8}, {_: u8}>` + = note: required for the cast to the object type `dyn Traitor<{_: u8}>` error: aborting due to 2 previous errors -- cgit 1.4.1-3-g733a5