mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
bless clippy tests
This commit is contained in:
parent
449ad044f2
commit
6fc412fb73
@ -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
|
||||
@ -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
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -44,7 +44,7 @@ help: consider removing `&` from the pattern
|
||||
|
|
||||
LL - &v => {},
|
||||
LL + v => {},
|
||||
|
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/match-ergonomics.rs:40:13
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
|
@ -12,7 +12,7 @@ help: use `map_or(<a>, <f>)` instead
|
||||
|
|
||||
LL - let _ = opt.map(|x| x + 1)
|
||||
LL + let _ = opt.map_or(0, |x| x + 1);
|
||||
|
|
||||
|
|
||||
|
||||
error: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
|
||||
--> $DIR/map_unwrap_or.rs:20:13
|
||||
@ -59,7 +59,7 @@ help: use `and_then(<f>)` instead
|
||||
|
|
||||
LL - let _ = opt.map(|x| Some(x + 1)).unwrap_or(None);
|
||||
LL + let _ = opt.and_then(|x| Some(x + 1));
|
||||
|
|
||||
|
|
||||
|
||||
error: called `map(<f>).unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then(<f>)` instead
|
||||
--> $DIR/map_unwrap_or.rs:31:13
|
||||
@ -92,7 +92,7 @@ help: use `and_then(<f>)` instead
|
||||
|
|
||||
LL - .map(|x| Some(x + 1))
|
||||
LL + .and_then(|x| Some(x + 1));
|
||||
|
|
||||
|
|
||||
|
||||
error: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
|
||||
--> $DIR/map_unwrap_or.rs:46:13
|
||||
@ -104,7 +104,7 @@ help: use `map_or(<a>, <f>)` instead
|
||||
|
|
||||
LL - let _ = Some("prefix").map(|p| format!("{}.", p)).unwrap_or(id);
|
||||
LL + let _ = Some("prefix").map_or(id, |p| format!("{}.", p));
|
||||
|
|
||||
|
|
||||
|
||||
error: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value. This can be done more directly by calling `map_or_else(<g>, <f>)` instead
|
||||
--> $DIR/map_unwrap_or.rs:50:13
|
||||
|
@ -164,7 +164,7 @@ help: remove the assignments from the `match` arms
|
||||
|
|
||||
LL - 1 => f = "three",
|
||||
LL + 1 => "three",
|
||||
|
|
||||
|
|
||||
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:76:5
|
||||
@ -180,7 +180,7 @@ help: remove the assignments from the branches
|
||||
|
|
||||
LL - g = 5;
|
||||
LL + 5
|
||||
|
|
||||
|
|
||||
help: add a semicolon after the `if` expression
|
||||
|
|
||||
LL | };
|
||||
|
@ -9,7 +9,7 @@ help: try this
|
||||
|
|
||||
LL - print!("Hello {}", "world");
|
||||
LL + print!("Hello world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:26:36
|
||||
@ -21,7 +21,7 @@ help: try this
|
||||
|
|
||||
LL - println!("Hello {} {}", world, "world");
|
||||
LL + println!("Hello {} world", world);
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:27:26
|
||||
@ -33,7 +33,7 @@ help: try this
|
||||
|
|
||||
LL - println!("Hello {}", "world");
|
||||
LL + println!("Hello world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:32:25
|
||||
@ -45,7 +45,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{0} {1}", "hello", "world");
|
||||
LL + println!("hello {1}", "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:32:34
|
||||
@ -57,7 +57,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{0} {1}", "hello", "world");
|
||||
LL + println!("{0} world", "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:33:25
|
||||
@ -69,7 +69,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{1} {0}", "hello", "world");
|
||||
LL + println!("{1} hello", "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:33:34
|
||||
@ -81,7 +81,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{1} {0}", "hello", "world");
|
||||
LL + println!("world {0}", "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:36:29
|
||||
@ -93,7 +93,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{foo} {bar}", foo = "hello", bar = "world");
|
||||
LL + println!("hello {bar}", bar = "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:36:44
|
||||
@ -105,7 +105,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{foo} {bar}", foo = "hello", bar = "world");
|
||||
LL + println!("{foo} world", foo = "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:37:29
|
||||
@ -117,7 +117,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{bar} {foo}", foo = "hello", bar = "world");
|
||||
LL + println!("{bar} hello", bar = "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/print_literal.rs:37:44
|
||||
@ -129,7 +129,7 @@ help: try this
|
||||
|
|
||||
LL - println!("{bar} {foo}", foo = "hello", bar = "world");
|
||||
LL + println!("world {foo}", foo = "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: aborting due to 11 previous errors
|
||||
|
||||
|
@ -9,7 +9,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("Hello/n");
|
||||
LL + println!("Hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:9:5
|
||||
@ -21,7 +21,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("Hello {}/n", "world");
|
||||
LL + println!("Hello {}", "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:10:5
|
||||
@ -33,7 +33,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("Hello {} {}/n", "world", "#2");
|
||||
LL + println!("Hello {} {}", "world", "#2");
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:11:5
|
||||
@ -45,7 +45,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("{}/n", 1265);
|
||||
LL + println!("{}", 1265);
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:12:5
|
||||
@ -57,7 +57,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("/n");
|
||||
LL + println!();
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:31:5
|
||||
@ -69,7 +69,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("//n"); // should fail
|
||||
LL + println!("/"); // should fail
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:38:5
|
||||
@ -111,7 +111,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("/r/n"); //~ ERROR
|
||||
LL + println!("/r"); //~ ERROR
|
||||
|
|
||||
|
|
||||
|
||||
error: using `print!()` with a format string that ends in a single newline
|
||||
--> $DIR/print_with_newline.rs:51:5
|
||||
@ -123,7 +123,7 @@ help: use `println!` instead
|
||||
|
|
||||
LL - print!("foo/rbar/n") // ~ ERROR
|
||||
LL + println!("foo/rbar") // ~ ERROR
|
||||
|
|
||||
|
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
|
@ -13,7 +13,7 @@ help: remove this `&`
|
||||
|
|
||||
LL - let other = match get_file_path(&t) {
|
||||
LL + let other = match get_file_path(t) {
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary use of `copied`
|
||||
--> $DIR/unnecessary_iter_cloned.rs:46:22
|
||||
@ -29,7 +29,7 @@ help: remove this `&`
|
||||
|
|
||||
LL - let other = match get_file_path(&t) {
|
||||
LL + let other = match get_file_path(t) {
|
||||
|
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -489,7 +489,7 @@ help: remove this `&`
|
||||
|
|
||||
LL - let path = match get_file_path(&t) {
|
||||
LL + let path = match get_file_path(t) {
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary use of `to_vec`
|
||||
--> $DIR/unnecessary_to_owned.rs:221:14
|
||||
|
@ -9,7 +9,7 @@ help: try this
|
||||
|
|
||||
LL - write!(v, "Hello {}", "world");
|
||||
LL + write!(v, "Hello world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:31:39
|
||||
@ -21,7 +21,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "Hello {} {}", world, "world");
|
||||
LL + writeln!(v, "Hello {} world", world);
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:32:29
|
||||
@ -33,7 +33,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "Hello {}", "world");
|
||||
LL + writeln!(v, "Hello world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:37:28
|
||||
@ -45,7 +45,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{0} {1}", "hello", "world");
|
||||
LL + writeln!(v, "hello {1}", "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:37:37
|
||||
@ -57,7 +57,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{0} {1}", "hello", "world");
|
||||
LL + writeln!(v, "{0} world", "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:38:28
|
||||
@ -69,7 +69,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{1} {0}", "hello", "world");
|
||||
LL + writeln!(v, "{1} hello", "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:38:37
|
||||
@ -81,7 +81,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{1} {0}", "hello", "world");
|
||||
LL + writeln!(v, "world {0}", "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:41:32
|
||||
@ -93,7 +93,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
|
||||
LL + writeln!(v, "hello {bar}", bar = "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:41:47
|
||||
@ -105,7 +105,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
|
||||
LL + writeln!(v, "{foo} world", foo = "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:42:32
|
||||
@ -117,7 +117,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
|
||||
LL + writeln!(v, "{bar} hello", bar = "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal.rs:42:47
|
||||
@ -129,7 +129,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
|
||||
LL + writeln!(v, "world {foo}", foo = "hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: aborting due to 11 previous errors
|
||||
|
||||
|
@ -9,7 +9,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{}", "{hello}");
|
||||
LL + writeln!(v, "{{hello}}");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal_2.rs:10:24
|
||||
@ -21,7 +21,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, r"{}", r"{hello}");
|
||||
LL + writeln!(v, r"{{hello}}");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal_2.rs:11:23
|
||||
@ -33,7 +33,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{}", '/'');
|
||||
LL + writeln!(v, "'");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal_2.rs:12:23
|
||||
@ -45,7 +45,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, "{}", '"');
|
||||
LL + writeln!(v, "/"");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal_2.rs:14:24
|
||||
@ -57,7 +57,7 @@ help: try this
|
||||
|
|
||||
LL - writeln!(v, r"{}", '/'');
|
||||
LL + writeln!(v, r"'");
|
||||
|
|
||||
|
|
||||
|
||||
error: literal with an empty format string
|
||||
--> $DIR/write_literal_2.rs:18:9
|
||||
|
@ -9,7 +9,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "Hello/n");
|
||||
LL + writeln!(v, "Hello");
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:14:5
|
||||
@ -21,7 +21,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "Hello {}/n", "world");
|
||||
LL + writeln!(v, "Hello {}", "world");
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:15:5
|
||||
@ -33,7 +33,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "Hello {} {}/n", "world", "#2");
|
||||
LL + writeln!(v, "Hello {} {}", "world", "#2");
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:16:5
|
||||
@ -45,7 +45,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "{}/n", 1265);
|
||||
LL + writeln!(v, "{}", 1265);
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:17:5
|
||||
@ -57,7 +57,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "/n");
|
||||
LL + writeln!(v);
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:36:5
|
||||
@ -69,7 +69,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "//n"); // should fail
|
||||
LL + writeln!(v, "/"); // should fail
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:43:5
|
||||
@ -115,7 +115,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "/r/n"); //~ ERROR
|
||||
LL + writeln!(v, "/r"); //~ ERROR
|
||||
|
|
||||
|
|
||||
|
||||
error: using `write!()` with a format string that ends in a single newline
|
||||
--> $DIR/write_with_newline.rs:58:5
|
||||
@ -127,7 +127,7 @@ help: use `writeln!()` instead
|
||||
|
|
||||
LL - write!(v, "foo/rbar/n");
|
||||
LL + writeln!(v, "foo/rbar");
|
||||
|
|
||||
|
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user