]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/stability.stderr
Rollup merge of #93813 - xldenis:public-mir-passes, r=wesleywiser
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / stability.stderr
1 error: trait methods cannot be stable const fn
2   --> $DIR/stability.rs:13:5
3    |
4 LL | /     fn sub(self, rhs: Self) -> Self {
5 LL | |
6 LL | |         Int(self.0 - rhs.0)
7 LL | |     }
8    | |_____^
9
10 error: `<Int as Add>::add` is not yet stable as a const fn
11   --> $DIR/stability.rs:31:5
12    |
13 LL |     Int(1i32) + Int(2i32)
14    |     ^^^^^^^^^^^^^^^^^^^^^
15    |
16    = help: const-stable functions can only call other const-stable functions
17
18 error: aborting due to 2 previous errors
19