rust/src/librustc_error_codes/error_codes/E0379.md
2020-03-03 13:30:17 +01:00

306 B

A trait method was declared const.

Erroneous code example:

#![feature(const_fn)]

trait Foo {
    const fn bar() -> u32; // error!
}

Trait methods cannot be declared const by design. For more information, see RFC 911.