diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-22 19:57:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-22 19:57:35 +0200 |
| commit | 0ed5f091a630a8f2812645e9a2d439a3b081a561 (patch) | |
| tree | aac09f7d1dad4008f3db4201bc17975d44858b7e /tests/ui/dropck | |
| parent | ab0f3e680e4fd50218914b8afa6900a67377721c (diff) | |
| parent | 8745ae21f9acd17fb3e3d1f9556280e652e996a0 (diff) | |
Rollup merge of #112508 - compiler-errors:trait-sig-lifetime-sugg-ice, r=cjgillot
Tweak spans for self arg, fix borrow suggestion for signature mismatch 1. Adjust a suggestion message that was annoying me 2. Fix #112503 by recording the right spans for the `self` part of the `&self` 0th argument 3. Remove the suggestion for adjusting a trait signature on type mismatch, bc that's gonna probably break all the other impls of the trait even if it fixes its one usage :sweat_smile:
Diffstat (limited to 'tests/ui/dropck')
| -rw-r--r-- | tests/ui/dropck/explicit-drop-bounds.bad1.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/dropck/explicit-drop-bounds.bad2.stderr | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr index 3b506c7e7ec..3ef11e2c0bb 100644 --- a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr +++ b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr @@ -15,10 +15,10 @@ LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply | ~~~~~~~~~~~~~~~~~~~~~~ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/explicit-drop-bounds.rs:32:13 + --> $DIR/explicit-drop-bounds.rs:32:18 | LL | fn drop(&mut self) {} - | ^^^^^^^^^ the trait `Copy` is not implemented for `T` + | ^^^^ the trait `Copy` is not implemented for `T` | note: required by a bound in `DropMe` --> $DIR/explicit-drop-bounds.rs:7:18 diff --git a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr index 832af3e521a..8138b86ddea 100644 --- a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr +++ b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr @@ -15,10 +15,10 @@ LL | impl<T: std::marker::Copy> Drop for DropMe<T> | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/explicit-drop-bounds.rs:40:13 + --> $DIR/explicit-drop-bounds.rs:40:18 | LL | fn drop(&mut self) {} - | ^^^^^^^^^ the trait `Copy` is not implemented for `T` + | ^^^^ the trait `Copy` is not implemented for `T` | note: required by a bound in `DropMe` --> $DIR/explicit-drop-bounds.rs:7:18 |
