We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56ac2c4 commit 2a1dc1eCopy full SHA for 2a1dc1e
src/test/ui/issues/issue-31076.rs
@@ -0,0 +1,15 @@
1
+#![feature(no_core, lang_items)]
2
+#![no_core]
3
+
4
+#[lang="sized"]
5
+trait Sized {}
6
7
+#[lang="add"]
8
+trait Add<T> {}
9
10
+impl Add<i32> for i32 {}
11
12
+fn main() {
13
+ let x = 5 + 6;
14
+ //~^ ERROR binary operation `+` cannot be applied to type `{integer}`
15
+}
src/test/ui/issues/issue-31076.stderr
@@ -0,0 +1,11 @@
+error[E0369]: binary operation `+` cannot be applied to type `{integer}`
+ --> $DIR/typeck-issue-31076-correct-trait-impl.rs:13:13
+ |
+LL | let x = 5 + 6;
+ | ^^^^^
+ = note: an implementation of `std::ops::Add` might be missing for `{integer}`
+error: aborting due to previous error
+For more information about this error, try `rustc --explain E0369`.
0 commit comments