about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-06-20 16:07:14 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-07-26 15:40:04 +0400
commit1e1d6fe84dd086a9075fcfe5fc63d81738c02f12 (patch)
treea15344b31dae4da7c6873af22503fcef8c5db4e8 /src/test
parent198443711501234a5d98b6d621aae2cead73c8cb (diff)
downloadrust-1e1d6fe84dd086a9075fcfe5fc63d81738c02f12.tar.gz
rust-1e1d6fe84dd086a9075fcfe5fc63d81738c02f12.zip
Improve error message for unstable default body
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/stability-attribute/default-body-stability-err.rs6
-rw-r--r--src/test/ui/stability-attribute/default-body-stability-err.stderr14
2 files changed, 13 insertions, 7 deletions
diff --git a/src/test/ui/stability-attribute/default-body-stability-err.rs b/src/test/ui/stability-attribute/default-body-stability-err.rs
index 8f970d0c9f6..ecb281bccf6 100644
--- a/src/test/ui/stability-attribute/default-body-stability-err.rs
+++ b/src/test/ui/stability-attribute/default-body-stability-err.rs
@@ -8,11 +8,11 @@ use default_body::{Equal, JustTrait};
 struct Type;
 
 impl JustTrait for Type {}
-//~^ ERROR use of unstable library feature 'fun_default_body'
-//~| ERROR use of unstable library feature 'constant_default_body'
+//~^ ERROR not all trait items implemented, missing: `CONSTANT` [E0046]
+//~| ERROR not all trait items implemented, missing: `fun` [E0046]
 
 impl Equal for Type {
-    //~^ ERROR use of unstable library feature 'eq_default_body'
+    //~^ ERROR not all trait items implemented, missing: `eq` [E0046]
     fn neq(&self, other: &Self) -> bool {
         false
     }
diff --git a/src/test/ui/stability-attribute/default-body-stability-err.stderr b/src/test/ui/stability-attribute/default-body-stability-err.stderr
index 6abf68bbcae..ef666f30fc2 100644
--- a/src/test/ui/stability-attribute/default-body-stability-err.stderr
+++ b/src/test/ui/stability-attribute/default-body-stability-err.stderr
@@ -1,20 +1,24 @@
-error[E0658]: use of unstable library feature 'constant_default_body'
+error[E0046]: not all trait items implemented, missing: `CONSTANT`
   --> $DIR/default-body-stability-err.rs:10:1
    |
 LL | impl JustTrait for Type {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
+   = note: default implementation of `CONSTANT` is unstable
+   = note: use of unstable library feature 'constant_default_body'
    = help: add `#![feature(constant_default_body)]` to the crate attributes to enable
 
-error[E0658]: use of unstable library feature 'fun_default_body'
+error[E0046]: not all trait items implemented, missing: `fun`
   --> $DIR/default-body-stability-err.rs:10:1
    |
 LL | impl JustTrait for Type {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
+   = note: default implementation of `fun` is unstable
+   = note: use of unstable library feature 'fun_default_body'
    = help: add `#![feature(fun_default_body)]` to the crate attributes to enable
 
-error[E0658]: use of unstable library feature 'eq_default_body'
+error[E0046]: not all trait items implemented, missing: `eq`
   --> $DIR/default-body-stability-err.rs:14:1
    |
 LL | / impl Equal for Type {
@@ -25,8 +29,10 @@ LL | |     }
 LL | | }
    | |_^
    |
+   = note: default implementation of `eq` is unstable
+   = note: use of unstable library feature 'eq_default_body'
    = help: add `#![feature(eq_default_body)]` to the crate attributes to enable
 
 error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+For more information about this error, try `rustc --explain E0046`.