1 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
2 --> $DIR/const-and-non-const-impl.rs:5:1
4 LL | impl const std::ops::Add for i32 {
5 | ^^^^^^^^^^^-------------^^^^^---
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
11 = note: define and implement a trait or new type instead
13 error[E0119]: conflicting implementations of trait `std::ops::Add` for type `Int`
14 --> $DIR/const-and-non-const-impl.rs:22:1
16 LL | impl std::ops::Add for Int {
17 | -------------------------- first implementation here
19 LL | impl const std::ops::Add for Int {
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Int`
22 error[E0283]: type annotations needed
23 --> $DIR/const-and-non-const-impl.rs:5:12
25 LL | impl const std::ops::Add for i32 {
26 | ^^^^^^^^^^^^^ cannot infer type for type `i32`
28 note: multiple `impl`s satisfying `i32: Add` found
29 --> $DIR/const-and-non-const-impl.rs:5:1
31 LL | impl const std::ops::Add for i32 {
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33 = note: and another `impl` found in the `core` crate: `impl Add for i32;`
34 note: required by a bound in `Add`
35 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
37 LL | / pub trait Add<Rhs = Self> {
38 LL | | /// The resulting type after applying the `+` operator.
39 LL | | #[stable(feature = "rust1", since = "1.0.0")]
42 LL | | fn add(self, rhs: Rhs) -> Self::Output;
44 | |_^ required by this bound in `Add`
46 error[E0283]: type annotations needed
47 --> $DIR/const-and-non-const-impl.rs:14:6
49 LL | impl std::ops::Add for Int {
50 | ^^^^^^^^^^^^^ cannot infer type for struct `Int`
52 note: multiple `impl`s satisfying `Int: Add` found
53 --> $DIR/const-and-non-const-impl.rs:14:1
55 LL | impl std::ops::Add for Int {
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
58 LL | impl const std::ops::Add for Int {
59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 note: required by a bound in `Add`
61 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
63 LL | / pub trait Add<Rhs = Self> {
64 LL | | /// The resulting type after applying the `+` operator.
65 LL | | #[stable(feature = "rust1", since = "1.0.0")]
68 LL | | fn add(self, rhs: Rhs) -> Self::Output;
70 | |_^ required by this bound in `Add`
72 error[E0283]: type annotations needed
73 --> $DIR/const-and-non-const-impl.rs:22:12
75 LL | impl const std::ops::Add for Int {
76 | ^^^^^^^^^^^^^ cannot infer type for struct `Int`
78 note: multiple `impl`s satisfying `Int: Add` found
79 --> $DIR/const-and-non-const-impl.rs:14:1
81 LL | impl std::ops::Add for Int {
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
84 LL | impl const std::ops::Add for Int {
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 note: required by a bound in `Add`
87 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
89 LL | / pub trait Add<Rhs = Self> {
90 LL | | /// The resulting type after applying the `+` operator.
91 LL | | #[stable(feature = "rust1", since = "1.0.0")]
94 LL | | fn add(self, rhs: Rhs) -> Self::Output;
96 | |_^ required by this bound in `Add`
98 error: aborting due to 5 previous errors
100 Some errors have detailed explanations: E0117, E0119, E0283.
101 For more information about an error, try `rustc --explain E0117`.