about summary refs log tree commit diff
path: root/compiler/rustc_error_codes
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2020-10-05 21:45:55 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2020-10-06 11:22:24 -0700
commitb5693a39d9d7d1b5404c188899bf7d983c79dfe3 (patch)
treed9148a09566065da00d22483cd4e6023b77bc50e /compiler/rustc_error_codes
parent9beb6f81e4112eccf9965d46421a1da351b0593a (diff)
downloadrust-b5693a39d9d7d1b5404c188899bf7d983c79dfe3.tar.gz
rust-b5693a39d9d7d1b5404c188899bf7d983c79dfe3.zip
Update error code page
Diffstat (limited to 'compiler/rustc_error_codes')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0723.md16
1 files changed, 4 insertions, 12 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0723.md b/compiler/rustc_error_codes/src/error_codes/E0723.md
index 95d47ab21cb..bc224421915 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0723.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0723.md
@@ -3,12 +3,8 @@ An unstable feature in `const` contexts was used.
 Erroneous code example:
 
 ```compile_fail,E0723
-trait T {}
-
-impl T for () {}
-
-const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable
-    ()
+const fn foo<T: Copy>(_: T) { // error!
+   // ...
 }
 ```
 
@@ -18,11 +14,7 @@ feature flag:
 ```
 #![feature(const_fn)]
 
-trait T {}
-
-impl T for () {}
-
-const fn foo() -> impl T {
-    ()
+const fn foo<T: Copy>(_: T) { // ok!
+   // ...
 }
 ```