|
| 1 | +error[E0599]: the method `foo` exists for struct `Rc<Thing<_>>`, but its trait bounds were not satisfied |
| 2 | + --> $DIR/arbitrary-self-from-method-substs-no-turbofish2.rs:11:7 |
| 3 | + | |
| 4 | +LL | struct Thing<R>(std::marker::PhantomData<R>); |
| 5 | + | --------------- doesn't satisfy `Thing<_>: Deref` |
| 6 | +... |
| 7 | +LL | t.foo(); |
| 8 | + | ^^^ method cannot be called on `Rc<Thing<_>>` due to unsatisfied trait bounds |
| 9 | + | |
| 10 | +note: the following trait bounds were not satisfied: |
| 11 | + `<&Rc<Thing<_>> as Deref>::Target = Thing<&Rc<Thing<_>>>` |
| 12 | + `<&Thing<_> as Deref>::Target = Thing<&Thing<_>>` |
| 13 | + `<&mut Rc<Thing<_>> as Deref>::Target = Thing<&mut Rc<Thing<_>>>` |
| 14 | + `<&mut Thing<_> as Deref>::Target = Thing<&mut Thing<_>>` |
| 15 | + `<Rc<Thing<_>> as Deref>::Target = Thing<Rc<Thing<_>>>` |
| 16 | + `Thing<_>: Deref` |
| 17 | + --> $DIR/arbitrary-self-from-method-substs-no-turbofish2.rs:5:9 |
| 18 | + | |
| 19 | +LL | impl<R: std::ops::Deref<Target = Self>> Thing<R> { |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------- |
| 21 | + | | | |
| 22 | + | | unsatisfied trait bound introduced here |
| 23 | + | unsatisfied trait bound introduced here |
| 24 | +note: the trait `Deref` must be implemented |
| 25 | + --> $SRC_DIR/core/src/ops/deref.rs:LL:COL |
| 26 | + |
| 27 | +error[E0599]: the method `foo` exists for reference `&Rc<Thing<_>>`, but its trait bounds were not satisfied |
| 28 | + --> $DIR/arbitrary-self-from-method-substs-no-turbofish2.rs:19:7 |
| 29 | + | |
| 30 | +LL | struct Thing<R>(std::marker::PhantomData<R>); |
| 31 | + | --------------- doesn't satisfy `Thing<_>: Deref` |
| 32 | +... |
| 33 | +LL | t.foo(); |
| 34 | + | ^^^ method cannot be called on `&Rc<Thing<_>>` due to unsatisfied trait bounds |
| 35 | + | |
| 36 | +note: the following trait bounds were not satisfied: |
| 37 | + `<&&Rc<Thing<_>> as Deref>::Target = Thing<&&Rc<Thing<_>>>` |
| 38 | + `<&Rc<Thing<_>> as Deref>::Target = Thing<&Rc<Thing<_>>>` |
| 39 | + `<&Thing<_> as Deref>::Target = Thing<&Thing<_>>` |
| 40 | + `<&mut &Rc<Thing<_>> as Deref>::Target = Thing<&mut &Rc<Thing<_>>>` |
| 41 | + `<&mut Rc<Thing<_>> as Deref>::Target = Thing<&mut Rc<Thing<_>>>` |
| 42 | + `<&mut Thing<_> as Deref>::Target = Thing<&mut Thing<_>>` |
| 43 | + `<Rc<Thing<_>> as Deref>::Target = Thing<Rc<Thing<_>>>` |
| 44 | + `Thing<_>: Deref` |
| 45 | + --> $DIR/arbitrary-self-from-method-substs-no-turbofish2.rs:5:9 |
| 46 | + | |
| 47 | +LL | impl<R: std::ops::Deref<Target = Self>> Thing<R> { |
| 48 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------- |
| 49 | + | | | |
| 50 | + | | unsatisfied trait bound introduced here |
| 51 | + | unsatisfied trait bound introduced here |
| 52 | +note: the trait `Deref` must be implemented |
| 53 | + --> $SRC_DIR/core/src/ops/deref.rs:LL:COL |
| 54 | + |
| 55 | +error: aborting due to 2 previous errors |
| 56 | + |
| 57 | +For more information about this error, try `rustc --explain E0599`. |
0 commit comments