about summary refs log tree commit diff
path: root/tests/ui/impl-trait/impl-generic-mismatch.stderr
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-09 22:30:26 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-02-10 20:21:39 +0000
commitf0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch)
treee97d87013709bda13934fdc452a2a459a069876a /tests/ui/impl-trait/impl-generic-mismatch.stderr
parent8c04e395952022a451138dc4dbead6dd6ae65203 (diff)
downloadrust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz
rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
Diffstat (limited to 'tests/ui/impl-trait/impl-generic-mismatch.stderr')
-rw-r--r--tests/ui/impl-trait/impl-generic-mismatch.stderr10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ui/impl-trait/impl-generic-mismatch.stderr b/tests/ui/impl-trait/impl-generic-mismatch.stderr
index 973b65bfd62..18347bd0f97 100644
--- a/tests/ui/impl-trait/impl-generic-mismatch.stderr
+++ b/tests/ui/impl-trait/impl-generic-mismatch.stderr
@@ -24,8 +24,9 @@ LL |     fn bar(&self, _: &impl Debug) { }
    |
 help: try changing the `impl Trait` argument to a generic parameter
    |
-LL |     fn bar<U: Debug>(&self, _: &U) { }
-   |           ++++++++++            ~
+LL -     fn bar(&self, _: &impl Debug) { }
+LL +     fn bar<U: Debug>(&self, _: &U) { }
+   |
 
 error[E0643]: method `baz` has incompatible signature for trait
   --> $DIR/impl-generic-mismatch.rs:26:33
@@ -38,8 +39,9 @@ LL |     fn baz<T: Debug>(&self, _: &impl Debug, _: &T) { }
    |
 help: try changing the `impl Trait` argument to a generic parameter
    |
-LL |     fn baz<U: Debug, T: Debug>(&self, _: &T, _: &T) { }
-   |           ~~~~~~~~~~~~~~~~~~~~            ~
+LL -     fn baz<T: Debug>(&self, _: &impl Debug, _: &T) { }
+LL +     fn baz<U: Debug, T: Debug>(&self, _: &T, _: &T) { }
+   |
 
 error[E0643]: method `hash` has incompatible signature for trait
   --> $DIR/impl-generic-mismatch.rs:37:33