1 error[E0307]: invalid `self` parameter type: isize
2 --> $DIR/ufcs-explicit-self-bad.rs:8:18
4 LL | fn foo(self: isize, x: isize) -> isize {
7 = note: type of `self` must be `Self` or a type that dereferences to it
8 = 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`)
10 error[E0307]: invalid `self` parameter type: Bar<isize>
11 --> $DIR/ufcs-explicit-self-bad.rs:19:18
13 LL | fn foo(self: Bar<isize>, x: isize) -> isize {
16 = note: type of `self` must be `Self` or a type that dereferences to it
17 = 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`)
19 error[E0307]: invalid `self` parameter type: &Bar<usize>
20 --> $DIR/ufcs-explicit-self-bad.rs:23:18
22 LL | fn bar(self: &Bar<usize>, x: isize) -> isize {
25 = note: type of `self` must be `Self` or a type that dereferences to it
26 = 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`)
28 error[E0308]: mismatched `self` parameter type
29 --> $DIR/ufcs-explicit-self-bad.rs:37:21
31 LL | fn dummy2(self: &Bar<T>) {}
32 | ^^^^^^^ lifetime mismatch
34 = note: expected reference `&'a Bar<T>`
35 found reference `&Bar<T>`
36 note: the anonymous lifetime defined here...
37 --> $DIR/ufcs-explicit-self-bad.rs:37:21
39 LL | fn dummy2(self: &Bar<T>) {}
41 note: ...does not necessarily outlive the lifetime `'a` as defined here
42 --> $DIR/ufcs-explicit-self-bad.rs:35:6
44 LL | impl<'a, T> SomeTrait for &'a Bar<T> {
47 error[E0308]: mismatched `self` parameter type
48 --> $DIR/ufcs-explicit-self-bad.rs:37:21
50 LL | fn dummy2(self: &Bar<T>) {}
51 | ^^^^^^^ lifetime mismatch
53 = note: expected reference `&'a Bar<T>`
54 found reference `&Bar<T>`
55 note: the lifetime `'a` as defined here...
56 --> $DIR/ufcs-explicit-self-bad.rs:35:6
58 LL | impl<'a, T> SomeTrait for &'a Bar<T> {
60 note: ...does not necessarily outlive the anonymous lifetime defined here
61 --> $DIR/ufcs-explicit-self-bad.rs:37:21
63 LL | fn dummy2(self: &Bar<T>) {}
66 error[E0308]: mismatched `self` parameter type
67 --> $DIR/ufcs-explicit-self-bad.rs:39:21
69 LL | fn dummy3(self: &&Bar<T>) {}
70 | ^^^^^^^^ lifetime mismatch
72 = note: expected reference `&'a Bar<T>`
73 found reference `&Bar<T>`
74 note: the anonymous lifetime defined here...
75 --> $DIR/ufcs-explicit-self-bad.rs:39:22
77 LL | fn dummy3(self: &&Bar<T>) {}
79 note: ...does not necessarily outlive the lifetime `'a` as defined here
80 --> $DIR/ufcs-explicit-self-bad.rs:35:6
82 LL | impl<'a, T> SomeTrait for &'a Bar<T> {
85 error[E0308]: mismatched `self` parameter type
86 --> $DIR/ufcs-explicit-self-bad.rs:39:21
88 LL | fn dummy3(self: &&Bar<T>) {}
89 | ^^^^^^^^ lifetime mismatch
91 = note: expected reference `&'a Bar<T>`
92 found reference `&Bar<T>`
93 note: the lifetime `'a` as defined here...
94 --> $DIR/ufcs-explicit-self-bad.rs:35:6
96 LL | impl<'a, T> SomeTrait for &'a Bar<T> {
98 note: ...does not necessarily outlive the anonymous lifetime defined here
99 --> $DIR/ufcs-explicit-self-bad.rs:39:22
101 LL | fn dummy3(self: &&Bar<T>) {}
104 error: aborting due to 7 previous errors
106 Some errors have detailed explanations: E0307, E0308.
107 For more information about an error, try `rustc --explain E0307`.