summary refs log tree commit diff
path: root/src/test/ui/rfc-2632-const-trait-impl/stability.stderr
blob: 1ecff62955b99b98f2677cc1cb90897bba9b8e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error[E0723]: trait methods cannot be stable const fn
  --> $DIR/stability.rs:14:5
   |
LL | /     fn sub(self, rhs: Self) -> Self {
LL | |
LL | |         Int(self.0 - rhs.0)
LL | |     }
   | |_____^
   |
   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
   = help: add `#![feature(const_fn)]` to the crate attributes to enable

error[E0723]: can only call other `const fn` within a `const fn`, but `const <Int as std::ops::Add>::add` is not stable as `const fn`
  --> $DIR/stability.rs:32:5
   |
LL |     Int(1i32) + Int(2i32)
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
   = help: add `#![feature(const_fn)]` to the crate attributes to enable

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0723`.