diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-05 20:58:33 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-07-05 20:58:33 +0000 |
| commit | 75692056e1ab8ca8a5e0c8e2def4cabcf2f3b445 (patch) | |
| tree | 0cdfbcc1ddcabad13de4047d2be8b8a6db1a4da7 /tests/ui/ufcs | |
| parent | c4225812973cee4bba952cbf7a421f69871fed0d (diff) | |
| download | rust-75692056e1ab8ca8a5e0c8e2def4cabcf2f3b445.tar.gz rust-75692056e1ab8ca8a5e0c8e2def4cabcf2f3b445.zip | |
Use verbose suggestion for changing arg type
Diffstat (limited to 'tests/ui/ufcs')
| -rw-r--r-- | tests/ui/ufcs/ufcs-explicit-self-bad.stderr | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr index c48d094daea..2a8c4edbdb5 100644 --- a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr +++ b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr @@ -2,10 +2,7 @@ error[E0053]: method `dummy2` has an incompatible type for trait --> $DIR/ufcs-explicit-self-bad.rs:37:21 | LL | fn dummy2(self: &Bar<T>) {} - | ------^^^^^^^ - | | | - | | expected `&'a Bar<T>`, found `Bar<T>` - | help: change the self-receiver type to match the trait: `&self` + | ^^^^^^^ expected `&'a Bar<T>`, found `Bar<T>` | note: type in trait --> $DIR/ufcs-explicit-self-bad.rs:31:15 @@ -14,6 +11,10 @@ LL | fn dummy2(&self); | ^^^^^ = note: expected signature `fn(&&'a Bar<_>)` found signature `fn(&Bar<_>)` +help: change the self-receiver type to match the trait + | +LL | fn dummy2(&self) {} + | ~~~~~ error[E0307]: invalid `self` parameter type: `isize` --> $DIR/ufcs-explicit-self-bad.rs:8:18 |
