diff --git a/src/librustc_error_codes/error_codes/E0379.md b/src/librustc_error_codes/error_codes/E0379.md index 3503da6ac2f..930204847ec 100644 --- a/src/librustc_error_codes/error_codes/E0379.md +++ b/src/librustc_error_codes/error_codes/E0379.md @@ -1,3 +1,15 @@ +A trait method was declared const. + +Erroneous code example: + +```compile_fail,E0379 +#![feature(const_fn)] + +trait Foo { + const fn bar() -> u32; // error! +} +``` + Trait methods cannot be declared `const` by design. For more information, see [RFC 911].