]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr
Rollup merge of #106767 - chbaker0:disable-unstable-features, r=Mark-Simulacrum
[rust.git] / tests / ui / rfc-2632-const-trait-impl / const-and-non-const-impl.stderr
1 error[E0117]: only traits defined in the current crate can be implemented for primitive types
2   --> $DIR/const-and-non-const-impl.rs:5:1
3    |
4 LL | impl const std::ops::Add for i32 {
5    | ^^^^^^^^^^^-------------^^^^^---
6    | |          |                 |
7    | |          |                 `i32` is not defined in the current crate
8    | |          `i32` is not defined in the current crate
9    | impl doesn't use only types from inside the current crate
10    |
11    = note: define and implement a trait or new type instead
12
13 error[E0119]: conflicting implementations of trait `Add` for type `Int`
14   --> $DIR/const-and-non-const-impl.rs:22:1
15    |
16 LL | impl std::ops::Add for Int {
17    | -------------------------- first implementation here
18 ...
19 LL | impl const std::ops::Add for Int {
20    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Int`
21
22 error: aborting due to 2 previous errors
23
24 Some errors have detailed explanations: E0117, E0119.
25 For more information about an error, try `rustc --explain E0117`.