error[E0307]: invalid method receiver type: isize --> $DIR/ufcs-explicit-self-bad.rs:8:18 | LL | fn foo(self: isize, x: isize) -> isize { | ^^^^^ | = note: type must be `Self` or a type that dereferences to it = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0307]: invalid method receiver type: Bar --> $DIR/ufcs-explicit-self-bad.rs:19:18 | LL | fn foo(self: Bar, x: isize) -> isize { | ^^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0307]: invalid method receiver type: &Bar --> $DIR/ufcs-explicit-self-bad.rs:23:18 | LL | fn bar(self: &Bar, x: isize) -> isize { | ^^^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:37:21 | LL | fn dummy2(self: &Bar) {} | ^^^^^^^ lifetime mismatch | = note: expected type `&'a Bar` found type `&Bar` note: the anonymous lifetime #1 defined on the method body at 37:5... --> $DIR/ufcs-explicit-self-bad.rs:37:5 | LL | fn dummy2(self: &Bar) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 35:6 --> $DIR/ufcs-explicit-self-bad.rs:35:6 | LL | impl<'a, T> SomeTrait for &'a Bar { | ^^ error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:37:21 | LL | fn dummy2(self: &Bar) {} | ^^^^^^^ lifetime mismatch | = note: expected type `&'a Bar` found type `&Bar` note: the lifetime 'a as defined on the impl at 35:6... --> $DIR/ufcs-explicit-self-bad.rs:35:6 | LL | impl<'a, T> SomeTrait for &'a Bar { | ^^ 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 | LL | fn dummy2(self: &Bar) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:39:21 | LL | fn dummy3(self: &&Bar) {} | ^^^^^^^^ lifetime mismatch | = note: expected type `&'a Bar` found type `&Bar` note: the anonymous lifetime #2 defined on the method body at 39:5... --> $DIR/ufcs-explicit-self-bad.rs:39:5 | LL | fn dummy3(self: &&Bar) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 35:6 --> $DIR/ufcs-explicit-self-bad.rs:35:6 | LL | impl<'a, T> SomeTrait for &'a Bar { | ^^ error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:39:21 | LL | fn dummy3(self: &&Bar) {} | ^^^^^^^^ lifetime mismatch | = note: expected type `&'a Bar` found type `&Bar` note: the lifetime 'a as defined on the impl at 35:6... --> $DIR/ufcs-explicit-self-bad.rs:35:6 | LL | impl<'a, T> SomeTrait for &'a Bar { | ^^ 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 | LL | fn dummy3(self: &&Bar) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0308`.