diff --git a/tests/ui/booleans.stderr b/tests/ui/booleans.stderr index 37b9b3941..6367ba034 100644 --- a/tests/ui/booleans.stderr +++ b/tests/ui/booleans.stderr @@ -72,7 +72,6 @@ error: this boolean expression can be simplified | 34 | let _ = a == b && c == 5 && a == b; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | help: try | 34 | let _ = a == b && c == 5; @@ -85,7 +84,6 @@ error: this boolean expression can be simplified | 35 | let _ = a == b && c == 5 && b == a; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | help: try | 35 | let _ = a == b && c == 5; @@ -122,7 +120,6 @@ error: this boolean expression can be simplified | 39 | let _ = a != b || !(a != b || c == d); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | help: try | 39 | let _ = c != d || a != b; diff --git a/tests/ui/collapsible_if.stderr b/tests/ui/collapsible_if.stderr index e726a3628..bc10afced 100644 --- a/tests/ui/collapsible_if.stderr +++ b/tests/ui/collapsible_if.stderr @@ -25,7 +25,6 @@ error: this if statement can be collapsed 17 | | } 18 | | } | |_____^ - | help: try | 14 | if (x == "hello" || x == "world") && (y == "world" || y == "hello") { @@ -42,7 +41,6 @@ error: this if statement can be collapsed 23 | | } 24 | | } | |_____^ - | help: try | 20 | if x == "hello" && x == "world" && (y == "world" || y == "hello") { @@ -59,7 +57,6 @@ error: this if statement can be collapsed 29 | | } 30 | | } | |_____^ - | help: try | 26 | if (x == "hello" || x == "world") && y == "world" && y == "hello" { @@ -76,7 +73,6 @@ error: this if statement can be collapsed 35 | | } 36 | | } | |_____^ - | help: try | 32 | if x == "hello" && x == "world" && y == "world" && y == "hello" { @@ -93,7 +89,6 @@ error: this if statement can be collapsed 41 | | } 42 | | } | |_____^ - | help: try | 38 | if 42 == 1337 && 'a' != 'A' { @@ -111,7 +106,6 @@ error: this `else { if .. }` block can be collapsed 50 | | } 51 | | } | |_____^ - | help: try | 47 | } else if y == "world" { @@ -129,7 +123,6 @@ error: this `else { if .. }` block can be collapsed 58 | | } 59 | | } | |_____^ - | help: try | 55 | } else if let Some(42) = Some(42) { @@ -149,7 +142,6 @@ error: this `else { if .. }` block can be collapsed 69 | | } 70 | | } | |_____^ - | help: try | 63 | } else if y == "world" { @@ -172,7 +164,6 @@ error: this `else { if .. }` block can be collapsed 80 | | } 81 | | } | |_____^ - | help: try | 74 | } else if let Some(42) = Some(42) { @@ -195,7 +186,6 @@ error: this `else { if .. }` block can be collapsed 91 | | } 92 | | } | |_____^ - | help: try | 85 | } else if let Some(42) = Some(42) { @@ -218,7 +208,6 @@ error: this `else { if .. }` block can be collapsed 102 | | } 103 | | } | |_____^ - | help: try | 96 | } else if x == "hello" { @@ -241,7 +230,6 @@ error: this `else { if .. }` block can be collapsed 113 | | } 114 | | } | |_____^ - | help: try | 107 | } else if let Some(42) = Some(42) { diff --git a/tests/ui/for_loop.stderr b/tests/ui/for_loop.stderr index f968e0888..b09350970 100644 --- a/tests/ui/for_loop.stderr +++ b/tests/ui/for_loop.stderr @@ -91,7 +91,6 @@ error: the loop variable `i` is only used to index `vec`. 96 | | let _ = vec[i]; 97 | | } | |_____^ - | help: consider using an iterator | 95 | for in &vec { @@ -104,7 +103,6 @@ error: the loop variable `j` is only used to index `STATIC`. 101 | | println!("{:?}", STATIC[j]); 102 | | } | |_____^ - | help: consider using an iterator | 100 | for in STATIC.iter().take(4) { @@ -117,7 +115,6 @@ error: the loop variable `j` is only used to index `CONST`. 105 | | println!("{:?}", CONST[j]); 106 | | } | |_____^ - | help: consider using an iterator | 104 | for in CONST.iter().take(4) { @@ -130,7 +127,6 @@ error: the loop variable `i` is used to index `vec` 109 | | println!("{} {}", vec[i], i); 110 | | } | |_____^ - | help: consider using an iterator | 108 | for (i, ) in vec.iter().enumerate() { @@ -143,7 +139,6 @@ error: the loop variable `i` is only used to index `vec2`. 117 | | println!("{}", vec2[i]); 118 | | } | |_____^ - | help: consider using an iterator | 116 | for in vec2.iter().take(vec.len()) { @@ -156,7 +151,6 @@ error: the loop variable `i` is only used to index `vec`. 121 | | println!("{}", vec[i]); 122 | | } | |_____^ - | help: consider using an iterator | 120 | for in vec.iter().skip(5) { @@ -169,7 +163,6 @@ error: the loop variable `i` is only used to index `vec`. 125 | | println!("{}", vec[i]); 126 | | } | |_____^ - | help: consider using an iterator | 124 | for in vec.iter().take(MAX_LEN) { @@ -182,7 +175,6 @@ error: the loop variable `i` is only used to index `vec`. 129 | | println!("{}", vec[i]); 130 | | } | |_____^ - | help: consider using an iterator | 128 | for in vec.iter().take(MAX_LEN + 1) { @@ -195,7 +187,6 @@ error: the loop variable `i` is only used to index `vec`. 133 | | println!("{}", vec[i]); 134 | | } | |_____^ - | help: consider using an iterator | 132 | for in vec.iter().take(10).skip(5) { @@ -208,7 +199,6 @@ error: the loop variable `i` is only used to index `vec`. 137 | | println!("{}", vec[i]); 138 | | } | |_____^ - | help: consider using an iterator | 136 | for in vec.iter().take(10 + 1).skip(5) { @@ -221,7 +211,6 @@ error: the loop variable `i` is used to index `vec` 141 | | println!("{} {}", vec[i], i); 142 | | } | |_____^ - | help: consider using an iterator | 140 | for (i, ) in vec.iter().enumerate().skip(5) { @@ -234,7 +223,6 @@ error: the loop variable `i` is used to index `vec` 145 | | println!("{} {}", vec[i], i); 146 | | } | |_____^ - | help: consider using an iterator | 144 | for (i, ) in vec.iter().enumerate().take(10).skip(5) { @@ -261,7 +249,6 @@ error: this range is empty so this for loop will never run 153 | | println!("{}", i); 154 | | } | |_____^ - | help: consider using the following if you are attempting to iterate over this range in reverse | 152 | for i in (0...10).rev() { @@ -274,7 +261,6 @@ error: this range is empty so this for loop will never run 157 | | println!("{}", i); 158 | | } | |_____^ - | help: consider using the following if you are attempting to iterate over this range in reverse | 156 | for i in (0..MAX_LEN).rev() { @@ -295,7 +281,6 @@ error: this range is empty so this for loop will never run 186 | | println!("{}", i); 187 | | } | |_____^ - | help: consider using the following if you are attempting to iterate over this range in reverse | 185 | for i in (5 + 4..10).rev() { @@ -308,7 +293,6 @@ error: this range is empty so this for loop will never run 190 | | println!("{}", i); 191 | | } | |_____^ - | help: consider using the following if you are attempting to iterate over this range in reverse | 189 | for i in ((3 - 1)..(5 + 2)).rev() { @@ -460,7 +444,6 @@ error: you seem to want to iterate on a map's values 394 | | // `in *m.values()` as we used to 395 | | } | |_____^ - | help: use the corresponding method | 390 | for v in (*m).values() { @@ -473,7 +456,6 @@ error: you seem to want to iterate on a map's values 399 | | let _v = v; 400 | | } | |_____^ - | help: use the corresponding method | 398 | for v in m.values_mut() { @@ -486,7 +468,6 @@ error: you seem to want to iterate on a map's values 404 | | let _v = v; 405 | | } | |_____^ - | help: use the corresponding method | 403 | for v in (*m).values_mut() { @@ -499,7 +480,6 @@ error: you seem to want to iterate on a map's keys 410 | | let _k = k; 411 | | } | |_____^ - | help: use the corresponding method | 409 | for k in rm.keys() { @@ -555,7 +535,6 @@ error: it looks like you're manually copying between slices 497 | | dst2[i + 500] = src[i] 498 | | } | |_____^ - | help: try replacing the loop by | 495 | dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)]) diff --git a/tests/ui/implicit_hasher.stderr b/tests/ui/implicit_hasher.stderr index 52b686bf8..aaa1e37ca 100644 --- a/tests/ui/implicit_hasher.stderr +++ b/tests/ui/implicit_hasher.stderr @@ -19,7 +19,6 @@ error: impl for `HashMap` should be generalized over different hashers | 20 | impl Foo for (HashMap,) { | ^^^^^^^^^^^^^ - | help: consider adding a type parameter | 20 | impl Foo for (HashMap,) { @@ -34,7 +33,6 @@ error: impl for `HashMap` should be generalized over different hashers | 25 | impl Foo for HashMap { | ^^^^^^^^^^^^^^^^^^^^^^^ - | help: consider adding a type parameter | 25 | impl Foo for HashMap { @@ -49,7 +47,6 @@ error: impl for `HashSet` should be generalized over different hashers | 43 | impl Foo for HashSet { | ^^^^^^^^^^ - | help: consider adding a type parameter | 43 | impl Foo for HashSet { @@ -64,7 +61,6 @@ error: impl for `HashSet` should be generalized over different hashers | 48 | impl Foo for HashSet { | ^^^^^^^^^^^^^^^ - | help: consider adding a type parameter | 48 | impl Foo for HashSet { @@ -79,7 +75,6 @@ error: parameter of type `HashMap` should be generalized over different hashers | 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { | ^^^^^^^^^^^^^^^^^ - | help: consider adding a type parameter | 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { @@ -90,7 +85,6 @@ error: parameter of type `HashSet` should be generalized over different hashers | 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { | ^^^^^^^^^^^^ - | help: consider adding a type parameter | 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { @@ -104,7 +98,6 @@ error: impl for `HashMap` should be generalized over different hashers ... 83 | gen!(impl); | ----------- in this macro invocation - | help: consider adding a type parameter | 70 | impl Foo for HashMap { @@ -122,7 +115,6 @@ error: parameter of type `HashMap` should be generalized over different hashers ... 84 | gen!(fn bar); | ------------- in this macro invocation - | help: consider adding a type parameter | 78 | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) { @@ -136,7 +128,6 @@ error: parameter of type `HashSet` should be generalized over different hashers ... 84 | gen!(fn bar); | ------------- in this macro invocation - | help: consider adding a type parameter | 78 | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) { diff --git a/tests/ui/int_plus_one.stderr b/tests/ui/int_plus_one.stderr index 5d42ebb89..69a8621fb 100644 --- a/tests/ui/int_plus_one.stderr +++ b/tests/ui/int_plus_one.stderr @@ -15,7 +15,6 @@ error: Unnecessary `>= y + 1` or `x - 1 >=` | 11 | y + 1 <= x; | ^^^^^^^^^^ - | help: change `>= y + 1` to `> y` as shown | 11 | y < x; @@ -26,7 +25,6 @@ error: Unnecessary `>= y + 1` or `x - 1 >=` | 13 | x - 1 >= y; | ^^^^^^^^^^ - | help: change `>= y + 1` to `> y` as shown | 13 | x > y; @@ -37,7 +35,6 @@ error: Unnecessary `>= y + 1` or `x - 1 >=` | 14 | y <= x - 1; | ^^^^^^^^^^ - | help: change `>= y + 1` to `> y` as shown | 14 | y < x; diff --git a/tests/ui/large_enum_variant.stderr b/tests/ui/large_enum_variant.stderr index 899a84ede..5c6aac7d4 100644 --- a/tests/ui/large_enum_variant.stderr +++ b/tests/ui/large_enum_variant.stderr @@ -27,7 +27,6 @@ error: large size difference between variants | 34 | ContainingLargeEnum(LargeEnum), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | help: consider boxing the large fields to reduce the total size of the enum | 34 | ContainingLargeEnum(Box), @@ -62,7 +61,6 @@ error: large size difference between variants | 49 | StructLikeLarge2 { x: [i32; 8000] }, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | help: consider boxing the large fields to reduce the total size of the enum | 49 | StructLikeLarge2 { x: Box<[i32; 8000]> }, diff --git a/tests/ui/literals.stderr b/tests/ui/literals.stderr index 82c651e62..bcb9dbd13 100644 --- a/tests/ui/literals.stderr +++ b/tests/ui/literals.stderr @@ -77,7 +77,6 @@ error: this is a decimal constant | 30 | let fail8 = 0123; | ^^^^ - | help: if you mean to use a decimal constant, remove the `0` to remove confusion | 30 | let fail8 = 123; diff --git a/tests/ui/matches.stderr b/tests/ui/matches.stderr index 7ff38a353..e44a4dd78 100644 --- a/tests/ui/matches.stderr +++ b/tests/ui/matches.stderr @@ -143,7 +143,6 @@ error: you don't need to add `&` to all patterns 150 | | _ => println!("none"), 151 | | } | |_____^ - | help: instead of prefixing all patterns with `&`, you can dereference the expression | 148 | match *tup { .. } @@ -165,7 +164,6 @@ error: you don't need to add `&` to all patterns 166 | | println!("none"); 167 | | } | |_____^ - | help: instead of prefixing all patterns with `&`, you can dereference the expression | 165 | if let .. = *a { .. } diff --git a/tests/ui/methods.stderr b/tests/ui/methods.stderr index 469f81c65..65d8b82da 100644 --- a/tests/ui/methods.stderr +++ b/tests/ui/methods.stderr @@ -212,7 +212,6 @@ error: called `map_or(None, f)` on an Option value. This can be done more direct 151 | | } 152 | | ); | |_________________^ - | help: try using and_then instead | 149 | let _ = opt.and_then(|x| { diff --git a/tests/ui/needless_pass_by_value.stderr b/tests/ui/needless_pass_by_value.stderr index a6c0c0454..2ca96b127 100644 --- a/tests/ui/needless_pass_by_value.stderr +++ b/tests/ui/needless_pass_by_value.stderr @@ -29,7 +29,6 @@ error: this argument is passed by value, but not consumed in the function body | 44 | fn test_match(x: Option>, y: Option>) { | ^^^^^^^^^^^^^^^^^^^^^^ - | help: consider taking a reference instead | 44 | fn test_match(x: &Option>, y: Option>) { @@ -47,7 +46,6 @@ error: this argument is passed by value, but not consumed in the function body | 57 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) { | ^^^^^^^ - | help: consider taking a reference instead | 57 | fn test_destructure(x: Wrapper, y: &Wrapper, z: Wrapper) { @@ -73,7 +71,6 @@ error: this argument is passed by value, but not consumed in the function body | 75 | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { | ^^^^^^ - | help: consider changing the type to | 75 | fn issue_2114(s: String, t: &str, u: Vec, v: Vec) { @@ -94,7 +91,6 @@ error: this argument is passed by value, but not consumed in the function body | 75 | fn issue_2114(s: String, t: String, u: Vec, v: Vec) { | ^^^^^^^^ - | help: consider changing the type to | 75 | fn issue_2114(s: String, t: String, u: Vec, v: &[i32]) { diff --git a/tests/ui/needless_range_loop.stderr b/tests/ui/needless_range_loop.stderr index 94ee5f613..af78b370a 100644 --- a/tests/ui/needless_range_loop.stderr +++ b/tests/ui/needless_range_loop.stderr @@ -19,7 +19,6 @@ error: the loop variable `i` is only used to index `ms`. 30 | | ms[i] *= 2; 31 | | } | |_____^ - | help: consider using an iterator | 29 | for in &mut ms { @@ -33,7 +32,6 @@ error: the loop variable `i` is only used to index `ms`. 37 | | *x *= 2; 38 | | } | |_____^ - | help: consider using an iterator | 35 | for in &mut ms { diff --git a/tests/ui/new_without_default.stderr b/tests/ui/new_without_default.stderr index 0ced183b1..1f14b1330 100644 --- a/tests/ui/new_without_default.stderr +++ b/tests/ui/new_without_default.stderr @@ -15,7 +15,6 @@ error: you should consider deriving a `Default` implementation for `Bar` | 16 | pub fn new() -> Self { Bar } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | help: try this | 13 | #[derive(Default)] diff --git a/tests/ui/ptr_arg.stderr b/tests/ui/ptr_arg.stderr index 9c6804cd9..4fbf73183 100644 --- a/tests/ui/ptr_arg.stderr +++ b/tests/ui/ptr_arg.stderr @@ -23,7 +23,6 @@ error: writing `&Vec<_>` instead of `&[_]` involves one more reference and canno | 40 | fn cloned(x: &Vec) -> Vec { | ^^^^^^^^ - | help: change this to | 40 | fn cloned(x: &[u8]) -> Vec { @@ -42,7 +41,6 @@ error: writing `&String` instead of `&str` involves a new object where a slice w | 49 | fn str_cloned(x: &String) -> String { | ^^^^^^^ - | help: change this to | 49 | fn str_cloned(x: &str) -> String { @@ -65,7 +63,6 @@ error: writing `&String` instead of `&str` involves a new object where a slice w | 59 | fn false_positive_capacity(x: &Vec, y: &String) { | ^^^^^^^ - | help: change this to | 59 | fn false_positive_capacity(x: &Vec, y: &str) {