Skip to content

Commit

Permalink
bless clippy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Jun 16, 2022
1 parent 449ad04 commit 6fc412f
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 96 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/destructure-trait-ref.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ help: consider removing `&` from the pattern
|
LL - let &&x = &1isize as &dyn T;
LL + let &x = &1isize as &dyn T;
|
|

error[E0308]: mismatched types
--> $DIR/destructure-trait-ref.rs:36:11
Expand All @@ -46,7 +46,7 @@ help: consider removing `&` from the pattern
|
LL - let &&&x = &(&1isize as &dyn T);
LL + let &&x = &(&1isize as &dyn T);
|
|

error[E0308]: mismatched types
--> $DIR/destructure-trait-ref.rs:40:13
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/mismatched_types/issue-38371.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ help: to take parameter `_a` by reference, move `&` to the type
|
LL - fn foo(&_a: Foo) {}
LL + fn foo(_a: &Foo) {}
|
|

error[E0308]: mismatched types
--> $DIR/issue-38371.rs:16:9
Expand All @@ -28,7 +28,7 @@ help: consider removing `&` from the pattern
|
LL - fn agh(&&_a: &u32) {}
LL + fn agh(&_a: &u32) {}
|
|

error: aborting due to 2 previous errors

Expand Down
36 changes: 18 additions & 18 deletions src/test/ui/mismatched_types/ref-pat-suggestions.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ help: to take parameter `_a` by reference, move `&` to the type
|
LL - fn _f0(&_a: u32) {}
LL + fn _f0(_a: &u32) {}
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:4:8
Expand All @@ -28,7 +28,7 @@ help: to take parameter `_a` by reference, move `&mut` to the type
|
LL - fn _f1(&mut _a: u32) {}
LL + fn _f1(_a: &mut u32) {}
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:5:9
Expand All @@ -44,7 +44,7 @@ help: consider removing `&` from the pattern
|
LL - fn _f2(&&_a: &u32) {}
LL + fn _f2(&_a: &u32) {}
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:6:13
Expand All @@ -60,7 +60,7 @@ help: consider removing `&` from the pattern
|
LL - fn _f3(&mut &_a: &mut u32) {}
LL + fn _f3(&mut _a: &mut u32) {}
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:7:9
Expand All @@ -76,7 +76,7 @@ help: consider removing `&mut` from the pattern
|
LL - fn _f4(&&mut _a: &u32) {}
LL + fn _f4(&_a: &u32) {}
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:8:13
Expand All @@ -92,7 +92,7 @@ help: consider removing `&mut` from the pattern
|
LL - fn _f5(&mut &mut _a: &mut u32) {}
LL + fn _f5(&mut _a: &mut u32) {}
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:11:23
Expand All @@ -109,7 +109,7 @@ help: consider removing `&` from the pattern
|
LL - let _: fn(u32) = |&_a| ();
LL + let _: fn(u32) = |_a| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:12:23
Expand All @@ -126,7 +126,7 @@ help: consider removing `&mut` from the pattern
|
LL - let _: fn(u32) = |&mut _a| ();
LL + let _: fn(u32) = |_a| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:13:25
Expand All @@ -143,7 +143,7 @@ help: consider removing `&` from the pattern
|
LL - let _: fn(&u32) = |&&_a| ();
LL + let _: fn(&u32) = |&_a| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:14:33
Expand All @@ -160,7 +160,7 @@ help: consider removing `&` from the pattern
|
LL - let _: fn(&mut u32) = |&mut &_a| ();
LL + let _: fn(&mut u32) = |&mut _a| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:15:25
Expand All @@ -177,7 +177,7 @@ help: consider removing `&mut` from the pattern
|
LL - let _: fn(&u32) = |&&mut _a| ();
LL + let _: fn(&u32) = |&_a| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:16:33
Expand All @@ -194,7 +194,7 @@ help: consider removing `&mut` from the pattern
|
LL - let _: fn(&mut u32) = |&mut &mut _a| ();
LL + let _: fn(&mut u32) = |&mut _a| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:18:14
Expand All @@ -210,7 +210,7 @@ help: to take parameter `_a` by reference, move `&` to the type
|
LL - let _ = |&_a: u32| ();
LL + let _ = |_a: &u32| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:19:14
Expand All @@ -226,7 +226,7 @@ help: to take parameter `_a` by reference, move `&mut` to the type
|
LL - let _ = |&mut _a: u32| ();
LL + let _ = |_a: &mut u32| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:20:15
Expand All @@ -242,7 +242,7 @@ help: consider removing `&` from the pattern
|
LL - let _ = |&&_a: &u32| ();
LL + let _ = |&_a: &u32| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:21:19
Expand All @@ -258,7 +258,7 @@ help: consider removing `&` from the pattern
|
LL - let _ = |&mut &_a: &mut u32| ();
LL + let _ = |&mut _a: &mut u32| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:22:15
Expand All @@ -274,7 +274,7 @@ help: consider removing `&mut` from the pattern
|
LL - let _ = |&&mut _a: &u32| ();
LL + let _ = |&_a: &u32| ();
|
|

error[E0308]: mismatched types
--> $DIR/ref-pat-suggestions.rs:23:19
Expand All @@ -290,7 +290,7 @@ help: consider removing `&mut` from the pattern
|
LL - let _ = |&mut &mut _a: &mut u32| ();
LL + let _ = |&mut _a: &mut u32| ();
|
|

error: aborting due to 18 previous errors

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/pattern/for-loop-bad-item.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ help: consider removing `&mut` from the pattern
|
LL - for ((_, _), (&mut c, _)) in &mut map {
LL + for ((_, _), (c, _)) in &mut map {
|
|

error[E0308]: mismatched types
--> $DIR/for-loop-bad-item.rs:14:14
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/suggestions/match-ergonomics.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ help: consider removing `&` from the pattern
|
LL - [&v] => {},
LL + [v] => {},
|
|

error[E0529]: expected an array or slice, found `Vec<i32>`
--> $DIR/match-ergonomics.rs:8:9
Expand Down Expand Up @@ -44,7 +44,7 @@ help: consider removing `&` from the pattern
|
LL - &v => {},
LL + v => {},
|
|

error[E0308]: mismatched types
--> $DIR/match-ergonomics.rs:40:13
Expand All @@ -60,7 +60,7 @@ help: consider removing `&` from the pattern
|
LL - if let [&v] = &x[..] {}
LL + if let [v] = &x[..] {}
|
|

error: aborting due to 5 previous errors

Expand Down
16 changes: 8 additions & 8 deletions src/tools/clippy/tests/ui/eprint_with_newline.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ help: use `eprintln!` instead
|
LL - eprint!("Hello/n");
LL + eprintln!("Hello");
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:6:5
Expand All @@ -21,7 +21,7 @@ help: use `eprintln!` instead
|
LL - eprint!("Hello {}/n", "world");
LL + eprintln!("Hello {}", "world");
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:7:5
Expand All @@ -33,7 +33,7 @@ help: use `eprintln!` instead
|
LL - eprint!("Hello {} {}/n", "world", "#2");
LL + eprintln!("Hello {} {}", "world", "#2");
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:8:5
Expand All @@ -45,7 +45,7 @@ help: use `eprintln!` instead
|
LL - eprint!("{}/n", 1265);
LL + eprintln!("{}", 1265);
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:9:5
Expand All @@ -57,7 +57,7 @@ help: use `eprintln!` instead
|
LL - eprint!("/n");
LL + eprintln!();
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:28:5
Expand All @@ -69,7 +69,7 @@ help: use `eprintln!` instead
|
LL - eprint!("//n"); // should fail
LL + eprintln!("/"); // should fail
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:35:5
Expand Down Expand Up @@ -111,7 +111,7 @@ help: use `eprintln!` instead
|
LL - eprint!("/r/n"); //~ ERROR
LL + eprintln!("/r"); //~ ERROR
|
|

error: using `eprint!()` with a format string that ends in a single newline
--> $DIR/eprint_with_newline.rs:48:5
Expand All @@ -123,7 +123,7 @@ help: use `eprintln!` instead
|
LL - eprint!("foo/rbar/n") // ~ ERROR
LL + eprintln!("foo/rbar") // ~ ERROR
|
|

error: aborting due to 10 previous errors

20 changes: 10 additions & 10 deletions src/tools/clippy/tests/ui/manual_split_once.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ help: remove the `iter` usages
|
LL - let l = iter.next().unwrap();
LL +
|
|
help: remove the `iter` usages
|
LL - let r = iter.next().unwrap();
LL +
|
|

error: manual implementation of `split_once`
--> $DIR/manual_split_once.rs:49:5
Expand All @@ -121,12 +121,12 @@ help: remove the `iter` usages
|
LL - let l = iter.next()?;
LL +
|
|
help: remove the `iter` usages
|
LL - let r = iter.next()?;
LL +
|
|

error: manual implementation of `rsplit_once`
--> $DIR/manual_split_once.rs:53:5
Expand All @@ -146,12 +146,12 @@ help: remove the `iter` usages
|
LL - let r = iter.next().unwrap();
LL +
|
|
help: remove the `iter` usages
|
LL - let l = iter.next().unwrap();
LL +
|
|

error: manual implementation of `rsplit_once`
--> $DIR/manual_split_once.rs:57:5
Expand All @@ -171,12 +171,12 @@ help: remove the `iter` usages
|
LL - let r = iter.next()?;
LL +
|
|
help: remove the `iter` usages
|
LL - let l = iter.next()?;
LL +
|
|

error: manual implementation of `split_once`
--> $DIR/manual_split_once.rs:142:13
Expand All @@ -202,12 +202,12 @@ help: remove the `iter` usages
|
LL - let a = iter.next().unwrap();
LL +
|
|
help: remove the `iter` usages
|
LL - let b = iter.next().unwrap();
LL +
|
|

error: aborting due to 19 previous errors

Loading

0 comments on commit 6fc412f

Please sign in to comment.