]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / ui / rfc-2632-const-trait-impl / const-and-non-const-impl.stderr
CommitLineData
cdc7bbd5 1error[E0119]: conflicting implementations of trait `std::ops::Add` for type `i32`
74b04a01
XL
2 --> $DIR/const-and-non-const-impl.rs:6:1
3 |
4LL | impl const std::ops::Add for i32 {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: conflicting implementation in crate `core`:
1b1a35ee 8 - impl Add for i32;
74b04a01 9
cdc7bbd5 10error[E0119]: conflicting implementations of trait `std::ops::Add` for type `Int`
74b04a01
XL
11 --> $DIR/const-and-non-const-impl.rs:24:1
12 |
13LL | impl std::ops::Add for Int {
14 | -------------------------- first implementation here
15...
16LL | impl const std::ops::Add for Int {
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Int`
18
19error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
20 --> $DIR/const-and-non-const-impl.rs:6:1
21 |
22LL | impl const std::ops::Add for i32 {
23 | ^^^^^^^^^^^-------------^^^^^---
24 | | | |
25 | | | `i32` is not defined in the current crate
26 | | `i32` is not defined in the current crate
27 | impl doesn't use only types from inside the current crate
28 |
29 = note: define and implement a trait or new type instead
30
31error: aborting due to 3 previous errors
32
33Some errors have detailed explanations: E0117, E0119.
34For more information about an error, try `rustc --explain E0117`.