|
| 1 | +error[E0034]: multiple applicable items in scope |
| 2 | + --> $DIR/arbitrary_self_types_unshadowing.rs:42:27 |
| 3 | + | |
| 4 | +LL | assert_eq!(Wrapper(A).f(), 1); |
| 5 | + | ^ multiple `f` found |
| 6 | + | |
| 7 | +note: candidate #1 is defined in an impl for the type `A` |
| 8 | + --> $DIR/arbitrary_self_types_unshadowing.rs:8:5 |
| 9 | + | |
| 10 | +LL | pub fn f(self: Wrapper<Self>) -> i32 { 1 } |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | +note: candidate #2 is defined in an impl for the type `Wrapper<T>` |
| 13 | + --> $DIR/arbitrary_self_types_unshadowing.rs:36:5 |
| 14 | + | |
| 15 | +LL | pub fn f(self) -> i32 { 5 } |
| 16 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 17 | + |
| 18 | +error[E0034]: multiple applicable items in scope |
| 19 | + --> $DIR/arbitrary_self_types_unshadowing.rs:44:27 |
| 20 | + | |
| 21 | +LL | assert_eq!(Wrapper(A).g(), 2); |
| 22 | + | ^ multiple `g` found |
| 23 | + | |
| 24 | +note: candidate #1 is defined in an impl for the type `A` |
| 25 | + --> $DIR/arbitrary_self_types_unshadowing.rs:9:5 |
| 26 | + | |
| 27 | +LL | pub fn g(self: &Wrapper<Self>) -> i32 { 2 } |
| 28 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 29 | +note: candidate #2 is defined in an impl for the type `Wrapper<T>` |
| 30 | + --> $DIR/arbitrary_self_types_unshadowing.rs:37:5 |
| 31 | + | |
| 32 | +LL | pub fn g(&self) -> i32 { 6 } |
| 33 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 34 | + |
| 35 | +error[E0034]: multiple applicable items in scope |
| 36 | + --> $DIR/arbitrary_self_types_unshadowing.rs:46:27 |
| 37 | + | |
| 38 | +LL | assert_eq!(Wrapper(A).h(), 3); |
| 39 | + | ^ multiple `h` found |
| 40 | + | |
| 41 | +note: candidate #1 is defined in an impl for the type `A` |
| 42 | + --> $DIR/arbitrary_self_types_unshadowing.rs:10:5 |
| 43 | + | |
| 44 | +LL | pub fn h(self: &mut Wrapper<Self>) -> i32 { 3 } |
| 45 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 46 | +note: candidate #2 is defined in an impl for the type `Wrapper<T>` |
| 47 | + --> $DIR/arbitrary_self_types_unshadowing.rs:38:5 |
| 48 | + | |
| 49 | +LL | pub fn h(&mut self) -> i32 { 7 } |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | + |
| 52 | +error[E0034]: multiple applicable items in scope |
| 53 | + --> $DIR/arbitrary_self_types_unshadowing.rs:49:27 |
| 54 | + | |
| 55 | +LL | assert_eq!(Wrapper(B).f(), 9); |
| 56 | + | ^ multiple `f` found |
| 57 | + | |
| 58 | +note: candidate #1 is defined in an impl for the type `B` |
| 59 | + --> $DIR/arbitrary_self_types_unshadowing.rs:17:5 |
| 60 | + | |
| 61 | +LL | pub fn f(self: &Wrapper<Self>) -> i32 { 9 } |
| 62 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 63 | +note: candidate #2 is defined in an impl for the type `Wrapper<T>` |
| 64 | + --> $DIR/arbitrary_self_types_unshadowing.rs:36:5 |
| 65 | + | |
| 66 | +LL | pub fn f(self) -> i32 { 5 } |
| 67 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 68 | + |
| 69 | +error[E0034]: multiple applicable items in scope |
| 70 | + --> $DIR/arbitrary_self_types_unshadowing.rs:51:27 |
| 71 | + | |
| 72 | +LL | assert_eq!(Wrapper(C).f(), 10); |
| 73 | + | ^ multiple `f` found |
| 74 | + | |
| 75 | +note: candidate #1 is defined in an impl for the type `C` |
| 76 | + --> $DIR/arbitrary_self_types_unshadowing.rs:25:5 |
| 77 | + | |
| 78 | +LL | pub fn f(self: &mut Wrapper<Self>) -> i32 { 10 } |
| 79 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 80 | +note: candidate #2 is defined in an impl for the type `Wrapper<T>` |
| 81 | + --> $DIR/arbitrary_self_types_unshadowing.rs:36:5 |
| 82 | + | |
| 83 | +LL | pub fn f(self) -> i32 { 5 } |
| 84 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 85 | + |
| 86 | +error[E0034]: multiple applicable items in scope |
| 87 | + --> $DIR/arbitrary_self_types_unshadowing.rs:53:27 |
| 88 | + | |
| 89 | +LL | assert_eq!(Wrapper(C).g(), 11); |
| 90 | + | ^ multiple `g` found |
| 91 | + | |
| 92 | +note: candidate #1 is defined in an impl for the type `C` |
| 93 | + --> $DIR/arbitrary_self_types_unshadowing.rs:26:5 |
| 94 | + | |
| 95 | +LL | pub fn g(self: &mut Wrapper<Self>) -> i32 { 11 } |
| 96 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 97 | +note: candidate #2 is defined in an impl for the type `Wrapper<T>` |
| 98 | + --> $DIR/arbitrary_self_types_unshadowing.rs:37:5 |
| 99 | + | |
| 100 | +LL | pub fn g(&self) -> i32 { 6 } |
| 101 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 102 | + |
| 103 | +error: aborting due to 6 previous errors |
| 104 | + |
| 105 | +For more information about this error, try `rustc --explain E0034`. |
0 commit comments