2018-12-16 15:47:37 -06:00
error[E0307]: invalid method receiver type: isize
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:8:18
2018-08-08 07:28:26 -05:00
|
LL | fn foo(self: isize, x: isize) -> isize {
| ^^^^^
|
2018-12-16 15:47:37 -06:00
= note: type must be `Self` or a type that dereferences to it
2019-07-15 23:30:48 -05:00
= help: consider changing to `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`)
2018-08-08 07:28:26 -05:00
2018-12-16 15:47:37 -06:00
error[E0307]: invalid method receiver type: Bar<isize>
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:19:18
2018-08-08 07:28:26 -05:00
|
LL | fn foo(self: Bar<isize>, x: isize) -> isize {
| ^^^^^^^^^^
|
2018-12-16 15:47:37 -06:00
= note: type must be `Self` or a type that dereferences to it
2019-07-15 23:30:48 -05:00
= help: consider changing to `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`)
2018-08-08 07:28:26 -05:00
2018-12-16 15:47:37 -06:00
error[E0307]: invalid method receiver type: &Bar<usize>
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:23:18
2018-08-08 07:28:26 -05:00
|
LL | fn bar(self: &Bar<usize>, x: isize) -> isize {
| ^^^^^^^^^^^
|
2018-12-16 15:47:37 -06:00
= note: type must be `Self` or a type that dereferences to it
2019-07-15 23:30:48 -05:00
= help: consider changing to `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`)
2018-08-08 07:28:26 -05:00
error[E0308]: mismatched method receiver
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:37:21
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | fn dummy2(self: &Bar<T>) {}
2018-08-08 07:28:26 -05:00
| ^^^^^^^ lifetime mismatch
|
= note: expected type `&'a Bar<T>`
found type `&Bar<T>`
2018-12-25 09:56:47 -06:00
note: the anonymous lifetime #1 defined on the method body at 37:5...
--> $DIR/ufcs-explicit-self-bad.rs:37:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | fn dummy2(self: &Bar<T>) {}
2018-08-08 07:28:26 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-12-25 09:56:47 -06:00
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 35:6
--> $DIR/ufcs-explicit-self-bad.rs:35:6
2018-08-08 07:28:26 -05:00
|
LL | impl<'a, T> SomeTrait for &'a Bar<T> {
| ^^
error[E0308]: mismatched method receiver
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:37:21
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | fn dummy2(self: &Bar<T>) {}
2018-08-08 07:28:26 -05:00
| ^^^^^^^ lifetime mismatch
|
= note: expected type `&'a Bar<T>`
found type `&Bar<T>`
2018-12-25 09:56:47 -06:00
note: the lifetime 'a as defined on the impl at 35:6...
--> $DIR/ufcs-explicit-self-bad.rs:35:6
2018-08-08 07:28:26 -05:00
|
LL | impl<'a, T> SomeTrait for &'a Bar<T> {
| ^^
2018-12-25 09:56:47 -06:00
note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 37:5
--> $DIR/ufcs-explicit-self-bad.rs:37:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | fn dummy2(self: &Bar<T>) {}
2018-08-08 07:28:26 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched method receiver
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:39:21
2018-08-08 07:28:26 -05:00
|
LL | fn dummy3(self: &&Bar<T>) {}
| ^^^^^^^^ lifetime mismatch
|
= note: expected type `&'a Bar<T>`
found type `&Bar<T>`
2018-12-25 09:56:47 -06:00
note: the anonymous lifetime #2 defined on the method body at 39:5...
--> $DIR/ufcs-explicit-self-bad.rs:39:5
2018-08-08 07:28:26 -05:00
|
LL | fn dummy3(self: &&Bar<T>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-12-25 09:56:47 -06:00
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 35:6
--> $DIR/ufcs-explicit-self-bad.rs:35:6
2018-08-08 07:28:26 -05:00
|
LL | impl<'a, T> SomeTrait for &'a Bar<T> {
| ^^
error[E0308]: mismatched method receiver
2018-12-25 09:56:47 -06:00
--> $DIR/ufcs-explicit-self-bad.rs:39:21
2018-08-08 07:28:26 -05:00
|
LL | fn dummy3(self: &&Bar<T>) {}
| ^^^^^^^^ lifetime mismatch
|
= note: expected type `&'a Bar<T>`
found type `&Bar<T>`
2018-12-25 09:56:47 -06:00
note: the lifetime 'a as defined on the impl at 35:6...
--> $DIR/ufcs-explicit-self-bad.rs:35:6
2018-08-08 07:28:26 -05:00
|
LL | impl<'a, T> SomeTrait for &'a Bar<T> {
| ^^
2018-12-25 09:56:47 -06:00
note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 39:5
--> $DIR/ufcs-explicit-self-bad.rs:39:5
2018-08-08 07:28:26 -05:00
|
LL | fn dummy3(self: &&Bar<T>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 7 previous errors
2019-04-17 12:26:38 -05:00
For more information about this error, try `rustc --explain E0308`.