Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/ui/char_lit_as_u8_unfixable.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@no-rustfix
#![warn(clippy::char_lit_as_u8)]

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/char_lit_as_u8_unfixable.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: casting a character literal to `u8` truncates
--> tests/ui/char_lit_as_u8_unfixable.rs:6:13
--> tests/ui/char_lit_as_u8_unfixable.rs:5:13
|
LL | let _ = '❤' as u8;
| ^^^^^^^^^
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/must_use_unit_unfixable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//@no-rustfix

#[cfg_attr(all(), must_use, deprecated)]
fn issue_12320() {}
//~^ must_use_unit
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/must_use_unit_unfixable.stderr
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
error: this unit-returning function has a `#[must_use]` attribute
--> tests/ui/must_use_unit_unfixable.rs:4:1
--> tests/ui/must_use_unit_unfixable.rs:2:1
|
LL | fn issue_12320() {}
| ^^^^^^^^^^^^^^^^
|
help: remove `must_use`
--> tests/ui/must_use_unit_unfixable.rs:3:19
--> tests/ui/must_use_unit_unfixable.rs:1:19
|
LL | #[cfg_attr(all(), must_use, deprecated)]
| ^^^^^^^^
= note: `-D clippy::must-use-unit` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::must_use_unit)]`

error: this unit-returning function has a `#[must_use]` attribute
--> tests/ui/must_use_unit_unfixable.rs:8:1
--> tests/ui/must_use_unit_unfixable.rs:6:1
|
LL | fn issue_12320_2() {}
| ^^^^^^^^^^^^^^^^^^
|
help: remove `must_use`
--> tests/ui/must_use_unit_unfixable.rs:7:44
--> tests/ui/must_use_unit_unfixable.rs:5:44
|
LL | #[cfg_attr(all(), deprecated, doc = "foo", must_use)]
| ^^^^^^^^
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/needless_borrow_pat.fixed
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// FIXME: run-rustfix waiting on multi-span suggestions

#![warn(clippy::needless_borrow)]
#![allow(clippy::needless_borrowed_reference, clippy::explicit_auto_deref)]

Expand Down
2 changes: 0 additions & 2 deletions tests/ui/needless_borrow_pat.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// FIXME: run-rustfix waiting on multi-span suggestions

#![warn(clippy::needless_borrow)]
#![allow(clippy::needless_borrowed_reference, clippy::explicit_auto_deref)]

Expand Down
24 changes: 12 additions & 12 deletions tests/ui/needless_borrow_pat.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:59:14
--> tests/ui/needless_borrow_pat.rs:57:14
|
LL | Some(ref x) => x,
| ^^^^^ help: try: `x`
Expand All @@ -8,7 +8,7 @@ LL | Some(ref x) => x,
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:66:14
--> tests/ui/needless_borrow_pat.rs:64:14
|
LL | Some(ref x) => *x,
| ^^^^^
Expand All @@ -20,7 +20,7 @@ LL + Some(x) => x,
|

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:73:14
--> tests/ui/needless_borrow_pat.rs:71:14
|
LL | Some(ref x) => {
| ^^^^^
Expand All @@ -35,19 +35,19 @@ LL ~ f1(x);
|

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:85:14
--> tests/ui/needless_borrow_pat.rs:83:14
|
LL | Some(ref x) => m1!(x),
| ^^^^^ help: try: `x`

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:91:15
--> tests/ui/needless_borrow_pat.rs:89:15
|
LL | let _ = |&ref x: &&String| {
| ^^^^^ help: try: `x`

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:98:10
--> tests/ui/needless_borrow_pat.rs:96:10
|
LL | let (ref y,) = (&x,);
| ^^^^^
Expand All @@ -61,13 +61,13 @@ LL ~ let _: &String = y;
|

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:110:14
--> tests/ui/needless_borrow_pat.rs:108:14
|
LL | Some(ref x) => x.0,
| ^^^^^ help: try: `x`

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:121:14
--> tests/ui/needless_borrow_pat.rs:119:14
|
LL | E::A(ref x) | E::B(ref x) => *x,
| ^^^^^ ^^^^^
Expand All @@ -79,13 +79,13 @@ LL + E::A(x) | E::B(x) => x,
|

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:128:21
--> tests/ui/needless_borrow_pat.rs:126:21
|
LL | if let Some(ref x) = Some(&String::new());
| ^^^^^ help: try: `x`

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:138:12
--> tests/ui/needless_borrow_pat.rs:136:12
|
LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
| ^^^^^
Expand All @@ -100,13 +100,13 @@ LL ~ x
|

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:147:11
--> tests/ui/needless_borrow_pat.rs:145:11
|
LL | fn f(&ref x: &&String) {
| ^^^^^ help: try: `x`

error: this pattern creates a reference to a reference
--> tests/ui/needless_borrow_pat.rs:157:11
--> tests/ui/needless_borrow_pat.rs:155:11
|
LL | fn f(&ref x: &&String) {
| ^^^^^
Expand Down