]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-3702-2.rs
Rollup merge of #61419 - scottmcm:casing-is-on-strings, r=cramertj
[rust.git] / src / test / ui / issues / issue-3702-2.rs
1 pub trait ToPrimitive {
2     fn to_int(&self) -> isize { 0 }
3 }
4
5 impl ToPrimitive for i32 {}
6 impl ToPrimitive for isize {}
7
8 trait Add {
9     fn to_int(&self) -> isize;
10     fn add_dynamic(&self, other: &dyn Add) -> isize;
11 }
12
13 impl Add for isize {
14     fn to_int(&self) -> isize { *self }
15     fn add_dynamic(&self, other: &dyn Add) -> isize {
16         self.to_int() + other.to_int() //~ ERROR multiple applicable items in scope
17     }
18 }
19
20 fn main() { }