about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-06-03 20:00:39 +0200
committerlcnr <rust@lcnr.de>2022-06-08 10:13:00 +0200
commit2ea468e386230375229c68a09affcba23cd79487 (patch)
tree019b1d3fdaccd198cecae355e8b28fd0fc3785a3 /src
parent154eba64b9e845f58ab4214cfcb6f202dfa5c210 (diff)
downloadrust-2ea468e386230375229c68a09affcba23cd79487.tar.gz
rust-2ea468e386230375229c68a09affcba23cd79487.zip
dedup diagnostics default params handling
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs4
-rw-r--r--src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr8
-rw-r--r--src/test/ui/const-generics/defaults/trait_objects_fail.rs2
-rw-r--r--src/test/ui/const-generics/defaults/trait_objects_fail.stderr6
4 files changed, 10 insertions, 10 deletions
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<const N: u8>() -> impl Traitor<N> {
-    //~^ error: the trait bound `u32: Traitor<N, N>` is not satisfied
+    //~^ error: the trait bound `u32: Traitor<N>` 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<N>`
 
-error[E0277]: the trait bound `u32: Traitor<N, N>` is not satisfied
+error[E0277]: the trait bound `u32: Traitor<N>` is not satisfied
   --> $DIR/rp_impl_trait_fail.rs:17:26
    |
 LL | fn uwu<const N: u8>() -> impl Traitor<N> {
-   |                          ^^^^^^^^^^^^^^^ the trait `Traitor<N, N>` is not implemented for `u32`
+   |                          ^^^^^^^^^^^^^^^ the trait `Traitor<N>` is not implemented for `u32`
    |
    = help: the following other types implement trait `Traitor<N, M>`:
              <u32 as Traitor<N, 2_u8>>
              <u64 as Traitor<1_u8, 2_u8>>
 
-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<N, M>`:
              <u32 as Traitor<N, 2_u8>>
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