summary refs log tree commit diff
path: root/src/test/ui/issues/issue-31076.rs
blob: e4531072e9be42c3e6735619de0023e96e6a2564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(no_core, lang_items)]
#![no_core]

#[lang="sized"]
trait Sized {}

#[lang="add"]
trait Add<T> {}

impl Add<i32> for i32 {}

fn main() {
    let x = 5 + 6;
    //~^ ERROR binary operation `+` cannot be applied to type `{integer}`
    let y = 5i32 + 6i32;
    //~^ ERROR binary operation `+` cannot be applied to type `i32`
}