about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEllen <supbscripter@gmail.com>2022-05-06 11:37:22 +0100
committerEllen <supbscripter@gmail.com>2022-05-06 11:37:22 +0100
commit2819b2d8c91ac7d3b366c3c76dca37d2b7b2b5d5 (patch)
tree85d83f65b861243aae722308839a21e1c438aa0c
parentfea1d765033eada386ffc1684d47c00a48d104f1 (diff)
wording tweaks
-rw-r--r--compiler/rustc_typeck/src/check/compare_method.rs4
-rw-r--r--src/test/ui/const-generics/defaults/mismatched_ty_const_in_trait_impl.stderr22
-rw-r--r--src/test/ui/const-generics/issues/issue-86820.rs2
-rw-r--r--src/test/ui/const-generics/issues/issue-86820.stderr6
-rw-r--r--src/test/ui/generic-associated-types/const_params_have_right_type.stderr6
5 files changed, 20 insertions, 20 deletions
diff --git a/compiler/rustc_typeck/src/check/compare_method.rs b/compiler/rustc_typeck/src/check/compare_method.rs
index 590131e4f6a..3e15079552c 100644
--- a/compiler/rustc_typeck/src/check/compare_method.rs
+++ b/compiler/rustc_typeck/src/check/compare_method.rs
@@ -1003,7 +1003,7 @@ fn compare_generic_param_kinds<'tcx>(
         } {
             let make_param_message = |prefix: &str, param: &ty::GenericParamDef| match param.kind {
                 Const { .. } => {
-                    format!("{} const parameter with type `{}`", prefix, tcx.type_of(param.def_id))
+                    format!("{} const parameter of type `{}`", prefix, tcx.type_of(param.def_id))
                 }
                 Type { .. } => format!("{} type parameter", prefix),
                 Lifetime { .. } => unreachable!(),
@@ -1016,7 +1016,7 @@ fn compare_generic_param_kinds<'tcx>(
                 tcx.sess,
                 param_impl_span,
                 E0053,
-                "{} `{}` has an incompatible generic parameter for trait: `{}`",
+                "{} `{}` has an incompatible generic parameter for trait `{}`",
                 assoc_item_kind_str(&impl_item),
                 trait_item.name,
                 &tcx.def_path_str(tcx.parent(trait_item.def_id))
diff --git a/src/test/ui/const-generics/defaults/mismatched_ty_const_in_trait_impl.stderr b/src/test/ui/const-generics/defaults/mismatched_ty_const_in_trait_impl.stderr
index a1ec8adec76..3455f2c8ea9 100644
--- a/src/test/ui/const-generics/defaults/mismatched_ty_const_in_trait_impl.stderr
+++ b/src/test/ui/const-generics/defaults/mismatched_ty_const_in_trait_impl.stderr
@@ -1,4 +1,4 @@
-error[E0053]: method `foo` has an incompatible generic parameter for trait: `Trait`
+error[E0053]: method `foo` has an incompatible generic parameter for trait `Trait`
   --> $DIR/mismatched_ty_const_in_trait_impl.rs:5:12
    |
 LL | trait Trait {
@@ -9,48 +9,48 @@ LL | }
 LL | impl Trait for () {
    | -----------------
 LL |     fn foo<const M: u64>() {}
-   |            ^^^^^^^^^^^^ found const parameter with type `u64`
+   |            ^^^^^^^^^^^^ found const parameter of type `u64`
 
-error[E0053]: method `bar` has an incompatible generic parameter for trait: `Other`
+error[E0053]: method `bar` has an incompatible generic parameter for trait `Other`
   --> $DIR/mismatched_ty_const_in_trait_impl.rs:13:12
    |
 LL | trait Other {
    |       -----
 LL |     fn bar<const M: u8>() {}
-   |            ----------- expected const parameter with type `u8`
+   |            ----------- expected const parameter of type `u8`
 LL | }
 LL | impl Other for () {
    | -----------------
 LL |     fn bar<T>() {}
    |            ^ found type parameter
 
-error[E0053]: method `baz` has an incompatible generic parameter for trait: `Uwu`
+error[E0053]: method `baz` has an incompatible generic parameter for trait `Uwu`
   --> $DIR/mismatched_ty_const_in_trait_impl.rs:21:12
    |
 LL | trait Uwu {
    |       ---
 LL |     fn baz<const N: u32>() {}
-   |            ------------ expected const parameter with type `u32`
+   |            ------------ expected const parameter of type `u32`
 LL | }
 LL | impl Uwu for () {
    | ---------------
 LL |     fn baz<const N: i32>() {}
-   |            ^^^^^^^^^^^^ found const parameter with type `i32`
+   |            ^^^^^^^^^^^^ found const parameter of type `i32`
 
-error[E0053]: method `bbbb` has an incompatible generic parameter for trait: `Aaaaaa`
+error[E0053]: method `bbbb` has an incompatible generic parameter for trait `Aaaaaa`
   --> $DIR/mismatched_ty_const_in_trait_impl.rs:29:13
    |
 LL | trait Aaaaaa {
    |       ------
 LL |     fn bbbb<const N: u32, T>() {}
-   |             ------------ expected const parameter with type `u32`
+   |             ------------ expected const parameter of type `u32`
 LL | }
 LL | impl Aaaaaa for () {
    | ------------------
 LL |     fn bbbb<T, const N: u32>() {}
    |             ^ found type parameter
 
-error[E0053]: method `abcd` has an incompatible generic parameter for trait: `Names`
+error[E0053]: method `abcd` has an incompatible generic parameter for trait `Names`
   --> $DIR/mismatched_ty_const_in_trait_impl.rs:37:13
    |
 LL | trait Names {
@@ -61,7 +61,7 @@ LL | }
 LL | impl Names for () {
    | -----------------
 LL |     fn abcd<const N: u32, T>() {}
-   |             ^^^^^^^^^^^^ found const parameter with type `u32`
+   |             ^^^^^^^^^^^^ found const parameter of type `u32`
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/const-generics/issues/issue-86820.rs b/src/test/ui/const-generics/issues/issue-86820.rs
index 9bcb8e1aeed..ae4bd943fd4 100644
--- a/src/test/ui/const-generics/issues/issue-86820.rs
+++ b/src/test/ui/const-generics/issues/issue-86820.rs
@@ -14,7 +14,7 @@ trait Bits {
 
 impl Bits for u8 {
     fn bit<const I: usize>(self) -> bool {
-        //~^ ERROR: method `bit` has an incompatible generic parameter for trait: `Bits` [E0053]
+        //~^ ERROR: method `bit` has an incompatible generic parameter for trait `Bits` [E0053]
         let i = 1 << I;
         let mask = u8::from(i);
         mask & self == mask
diff --git a/src/test/ui/const-generics/issues/issue-86820.stderr b/src/test/ui/const-generics/issues/issue-86820.stderr
index 4d54d654c12..3a9cd957f35 100644
--- a/src/test/ui/const-generics/issues/issue-86820.stderr
+++ b/src/test/ui/const-generics/issues/issue-86820.stderr
@@ -1,15 +1,15 @@
-error[E0053]: method `bit` has an incompatible generic parameter for trait: `Bits`
+error[E0053]: method `bit` has an incompatible generic parameter for trait `Bits`
   --> $DIR/issue-86820.rs:16:12
    |
 LL | trait Bits {
    |       ----
 LL |     fn bit<const I: u8>(self) -> bool;
-   |            ----------- expected const parameter with type `u8`
+   |            ----------- expected const parameter of type `u8`
 ...
 LL | impl Bits for u8 {
    | ----------------
 LL |     fn bit<const I: usize>(self) -> bool {
-   |            ^^^^^^^^^^^^^^ found const parameter with type `usize`
+   |            ^^^^^^^^^^^^^^ found const parameter of type `usize`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/generic-associated-types/const_params_have_right_type.stderr b/src/test/ui/generic-associated-types/const_params_have_right_type.stderr
index 9b8eddaff41..89c993dee5e 100644
--- a/src/test/ui/generic-associated-types/const_params_have_right_type.stderr
+++ b/src/test/ui/generic-associated-types/const_params_have_right_type.stderr
@@ -1,15 +1,15 @@
-error[E0053]: type `Foo` has an incompatible generic parameter for trait: `Trait`
+error[E0053]: type `Foo` has an incompatible generic parameter for trait `Trait`
   --> $DIR/const_params_have_right_type.rs:8:14
    |
 LL | trait Trait {
    |       -----
 LL |     type Foo<const N: u8>;
-   |              ----------- expected const parameter with type `u8`
+   |              ----------- expected const parameter of type `u8`
 ...
 LL | impl Trait for () {
    | -----------------
 LL |     type Foo<const N: u64> = u32;
-   |              ^^^^^^^^^^^^ found const parameter with type `u64`
+   |              ^^^^^^^^^^^^ found const parameter of type `u64`
 
 error: aborting due to previous error