|
| 1 | +error[E0801]: invalid generic `self` parameter type: `&R` |
| 2 | + --> $DIR/arbitrary_self_types_generic_receiver.rs:26:53 |
| 3 | + | |
| 4 | +LL | fn a<R: core::ops::Receiver<Target=Self>>(self: &R) {} |
| 5 | + | ^^ |
| 6 | + | |
| 7 | + = note: type of `self` must not be a method generic parameter type |
| 8 | + = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) |
| 9 | + |
| 10 | +error[E0801]: invalid generic `self` parameter type: `&mut R` |
| 11 | + --> $DIR/arbitrary_self_types_generic_receiver.rs:28:53 |
| 12 | + | |
| 13 | +LL | fn b<R: core::ops::Receiver<Target=Self>>(self: &mut R) {} |
| 14 | + | ^^^^^^ |
| 15 | + | |
| 16 | + = note: type of `self` must not be a method generic parameter type |
| 17 | + = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) |
| 18 | + |
| 19 | +error[E0801]: invalid generic `self` parameter type: `R` |
| 20 | + --> $DIR/arbitrary_self_types_generic_receiver.rs:30:53 |
| 21 | + | |
| 22 | +LL | fn c<R: core::ops::Receiver<Target=Self>>(self: R) {} |
| 23 | + | ^ |
| 24 | + | |
| 25 | + = note: type of `self` must not be a method generic parameter type |
| 26 | + = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) |
| 27 | + |
| 28 | +error[E0801]: invalid generic `self` parameter type: `R` |
| 29 | + --> $DIR/arbitrary_self_types_generic_receiver.rs:32:45 |
| 30 | + | |
| 31 | +LL | fn d<R: SomePtr<SomeTarget=Self>>(self: R) {} |
| 32 | + | ^ |
| 33 | + | |
| 34 | + = note: type of `self` must not be a method generic parameter type |
| 35 | + = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) |
| 36 | + |
| 37 | +error[E0801]: invalid generic `self` parameter type: `impl SomePtr<SomeTarget = Self>` |
| 38 | + --> $DIR/arbitrary_self_types_generic_receiver.rs:34:16 |
| 39 | + | |
| 40 | +LL | fn e(self: impl SomePtr<SomeTarget=Self>) {} |
| 41 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 42 | + | |
| 43 | + = note: type of `self` must not be a method generic parameter type |
| 44 | + = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) |
| 45 | + |
| 46 | +error: aborting due to 5 previous errors |
| 47 | + |
| 48 | +For more information about this error, try `rustc --explain E0801`. |
0 commit comments