about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-13 03:21:25 +0000
committerJubilee Young <workingjubilee@gmail.com>2025-02-14 00:44:10 -0800
commitfc532c5b322106e8ddc6485451cd5f14c4e995bd (patch)
tree92f505f83e79d7fdc24d5c128e6c7b656986ec90
parentef7aa51f1cf8d262ff5b29f3d6730c6f83fbad42 (diff)
downloadrust-fc532c5b322106e8ddc6485451cd5f14c4e995bd.tar.gz
rust-fc532c5b322106e8ddc6485451cd5f14c4e995bd.zip
Trim suggestion parts to the subset that is purely additive
-rw-r--r--tests/ui/implicit_return.stderr42
-rw-r--r--tests/ui/legacy_numeric_constants.stderr5
2 files changed, 18 insertions, 29 deletions
diff --git a/tests/ui/implicit_return.stderr b/tests/ui/implicit_return.stderr
index 0d2faa5e067..7ea72307450 100644
--- a/tests/ui/implicit_return.stderr
+++ b/tests/ui/implicit_return.stderr
@@ -8,8 +8,7 @@ LL |     true
    = help: to override `-D warnings` add `#[allow(clippy::implicit_return)]`
 help: add `return` as shown
    |
-LL -     true
-LL +     return true
+LL |     return true
    |
 
 error: missing `return` statement
@@ -20,9 +19,8 @@ LL |     if true { true } else { false }
    |
 help: add `return` as shown
    |
-LL -     if true { true } else { false }
-LL +     if true { return true } else { false }
-   |
+LL |     if true { return true } else { false }
+   |               ++++++
 
 error: missing `return` statement
   --> tests/ui/implicit_return.rs:19:29
@@ -32,9 +30,8 @@ LL |     if true { true } else { false }
    |
 help: add `return` as shown
    |
-LL -     if true { true } else { false }
-LL +     if true { true } else { return false }
-   |
+LL |     if true { true } else { return false }
+   |                             ++++++
 
 error: missing `return` statement
   --> tests/ui/implicit_return.rs:25:17
@@ -44,9 +41,8 @@ LL |         true => false,
    |
 help: add `return` as shown
    |
-LL -         true => false,
-LL +         true => return false,
-   |
+LL |         true => return false,
+   |                 ++++++
 
 error: missing `return` statement
   --> tests/ui/implicit_return.rs:26:20
@@ -56,9 +52,8 @@ LL |         false => { true },
    |
 help: add `return` as shown
    |
-LL -         false => { true },
-LL +         false => { return true },
-   |
+LL |         false => { return true },
+   |                    ++++++
 
 error: missing `return` statement
   --> tests/ui/implicit_return.rs:39:9
@@ -104,9 +99,8 @@ LL |     let _ = || { true };
    |
 help: add `return` as shown
    |
-LL -     let _ = || { true };
-LL +     let _ = || { return true };
-   |
+LL |     let _ = || { return true };
+   |                  ++++++
 
 error: missing `return` statement
   --> tests/ui/implicit_return.rs:73:16
@@ -116,9 +110,8 @@ LL |     let _ = || true;
    |
 help: add `return` as shown
    |
-LL -     let _ = || true;
-LL +     let _ = || return true;
-   |
+LL |     let _ = || return true;
+   |                ++++++
 
 error: missing `return` statement
   --> tests/ui/implicit_return.rs:81:5
@@ -128,8 +121,7 @@ LL |     format!("test {}", "test")
    |
 help: add `return` as shown
    |
-LL -     format!("test {}", "test")
-LL +     return format!("test {}", "test")
+LL |     return format!("test {}", "test")
    |
 
 error: missing `return` statement
@@ -140,8 +132,7 @@ LL |     m!(true, false)
    |
 help: add `return` as shown
    |
-LL -     m!(true, false)
-LL +     return m!(true, false)
+LL |     return m!(true, false)
    |
 
 error: missing `return` statement
@@ -191,8 +182,7 @@ LL |     true
    |
 help: add `return` as shown
    |
-LL -     true
-LL +     return true
+LL |     return true
    |
 
 error: aborting due to 16 previous errors
diff --git a/tests/ui/legacy_numeric_constants.stderr b/tests/ui/legacy_numeric_constants.stderr
index 74fe09e0f5c..91dfe79d55b 100644
--- a/tests/ui/legacy_numeric_constants.stderr
+++ b/tests/ui/legacy_numeric_constants.stderr
@@ -68,9 +68,8 @@ LL |     MAX;
    |
 help: use the associated constant instead
    |
-LL -     MAX;
-LL +     u32::MAX;
-   |
+LL |     u32::MAX;
+   |     +++++
 
 error: usage of a legacy numeric method
   --> tests/ui/legacy_numeric_constants.rs:49:10