]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/stability.stderr
Suppress "const" prefix of FnDef in MIR dump
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / stability.stderr
1 error[E0723]: trait methods cannot be stable const fn
2   --> $DIR/stability.rs:14:5
3    |
4 LL | /     fn sub(self, rhs: Self) -> Self {
5 LL | |
6 LL | |         Int(self.0 - rhs.0)
7 LL | |     }
8    | |_____^
9    |
10    = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
11    = help: add `#![feature(const_fn)]` to the crate attributes to enable
12
13 error[E0723]: can only call other `const fn` within a `const fn`, but `<Int as std::ops::Add>::add` is not stable as `const fn`
14   --> $DIR/stability.rs:32:5
15    |
16 LL |     Int(1i32) + Int(2i32)
17    |     ^^^^^^^^^^^^^^^^^^^^^
18    |
19    = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
20    = help: add `#![feature(const_fn)]` to the crate attributes to enable
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0723`.