Skip to content

Commit

Permalink
Trim suggestion parts to the subset that is purely additive
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors authored and workingjubilee committed Feb 14, 2025
1 parent ef7aa51 commit fc532c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
42 changes: 16 additions & 26 deletions tests/ui/implicit_return.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions tests/ui/legacy_numeric_constants.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc532c5

Please sign in to comment.