about summary refs log tree commit diff
path: root/tests/ui/malformed
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/malformed
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/malformed')
-rw-r--r--tests/ui/malformed/malformed-meta-delim.stderr10
-rw-r--r--tests/ui/malformed/malformed-special-attrs.stderr10
2 files changed, 12 insertions, 8 deletions
diff --git a/tests/ui/malformed/malformed-meta-delim.stderr b/tests/ui/malformed/malformed-meta-delim.stderr
index 27636c3d546..3f2357c435f 100644
--- a/tests/ui/malformed/malformed-meta-delim.stderr
+++ b/tests/ui/malformed/malformed-meta-delim.stderr
@@ -6,8 +6,9 @@ LL | #[allow { foo_lint } ]
    |
 help: the delimiters should be `(` and `)`
    |
-LL | #[allow ( foo_lint ) ]
-   |         ~          ~
+LL - #[allow { foo_lint } ]
+LL + #[allow ( foo_lint ) ]
+   |
 
 error: wrong meta list delimiters
   --> $DIR/malformed-meta-delim.rs:8:9
@@ -17,8 +18,9 @@ LL | #[allow [ foo_lint ] ]
    |
 help: the delimiters should be `(` and `)`
    |
-LL | #[allow ( foo_lint ) ]
-   |         ~          ~
+LL - #[allow [ foo_lint ] ]
+LL + #[allow ( foo_lint ) ]
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/malformed/malformed-special-attrs.stderr b/tests/ui/malformed/malformed-special-attrs.stderr
index 8f2ce20593f..a6220710cf9 100644
--- a/tests/ui/malformed/malformed-special-attrs.stderr
+++ b/tests/ui/malformed/malformed-special-attrs.stderr
@@ -7,8 +7,9 @@ LL | #[cfg_attr]
    = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
 help: missing condition and attribute
    |
-LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL - #[cfg_attr]
+LL + #[cfg_attr(condition, attribute, other_attribute, ...)]
+   |
 
 error: malformed `cfg_attr` attribute input
   --> $DIR/malformed-special-attrs.rs:4:1
@@ -19,8 +20,9 @@ LL | #[cfg_attr = ""]
    = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
 help: missing condition and attribute
    |
-LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL - #[cfg_attr = ""]
+LL + #[cfg_attr(condition, attribute, other_attribute, ...)]
+   |
 
 error: malformed `derive` attribute input
   --> $DIR/malformed-special-attrs.rs:7:1