]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-31076.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-31076.rs
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     let y = 5i32 + 6i32;
16     //~^ ERROR binary operation `+` cannot be applied to type `i32`
17 }