diff --git a/src/librustc_mir/diagnostics.rs b/src/librustc_mir/diagnostics.rs index 084a6529908df..4df3004a9ada6 100644 --- a/src/librustc_mir/diagnostics.rs +++ b/src/librustc_mir/diagnostics.rs @@ -2388,14 +2388,14 @@ const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable To enable this feature on a nightly version of rustc, add the `const_fn` feature flag: -```compile_fail,E0723 +``` #![feature(const_fn)] trait T {} impl T for () {} -const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable +const fn foo() -> impl T { () } ```