2018-11-05 06:33:43 -06:00
|
|
|
#![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;
|
2021-09-28 09:48:54 -05:00
|
|
|
//~^ ERROR cannot add `i32` to `{integer}`
|
2018-11-05 07:54:10 -06:00
|
|
|
let y = 5i32 + 6i32;
|
2019-12-11 16:11:32 -06:00
|
|
|
//~^ ERROR cannot add `i32` to `i32`
|
2018-11-05 06:33:43 -06:00
|
|
|
}
|