From b5693a39d9d7d1b5404c188899bf7d983c79dfe3 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Mon, 5 Oct 2020 21:45:55 -0700 Subject: [PATCH] Update error code page --- .../rustc_error_codes/src/error_codes/E0723.md | 16 ++++------------ 1 file 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) { // error! + // ... } ``` @@ -18,11 +14,7 @@ feature flag: ``` #![feature(const_fn)] -trait T {} - -impl T for () {} - -const fn foo() -> impl T { - () +const fn foo(_: T) { // ok! + // ... } ```