2015-01-15 09:46:12 +02:00
|
|
|
use std::ops::Add;
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
<i32 as Add<u32>>::add(1, 2);
|
2018-01-22 19:13:06 -08:00
|
|
|
//~^ ERROR cannot add `u32` to `i32`
|
2022-08-24 18:36:44 +00:00
|
|
|
//~| ERROR cannot add `u32` to `i32`
|
2015-01-15 09:46:12 +02:00
|
|
|
<i32 as Add<i32>>::add(1u32, 2);
|
|
|
|
|
//~^ ERROR mismatched types
|
|
|
|
|
<i32 as Add<i32>>::add(1, 2u32);
|
|
|
|
|
//~^ ERROR mismatched types
|
|
|
|
|
}
|