Fix for the new nightly version.

This commit is contained in:
Laurent Mazare 2017-11-20 07:47:28 +00:00
parent 41a6d015ff
commit e7f4a9bb46
13 changed files with 0 additions and 64 deletions

View File

@ -72,7 +72,6 @@ error: this boolean expression can be simplified
| |
34 | let _ = a == b && c == 5 && a == b; 34 | let _ = a == b && c == 5 && a == b;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: try help: try
| |
34 | let _ = a == b && c == 5; 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; 35 | let _ = a == b && c == 5 && b == a;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: try help: try
| |
35 | let _ = a == b && c == 5; 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); 39 | let _ = a != b || !(a != b || c == d);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: try help: try
| |
39 | let _ = c != d || a != b; 39 | let _ = c != d || a != b;

View File

@ -25,7 +25,6 @@ error: this if statement can be collapsed
17 | | } 17 | | }
18 | | } 18 | | }
| |_____^ | |_____^
|
help: try help: try
| |
14 | if (x == "hello" || x == "world") && (y == "world" || y == "hello") { 14 | if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
@ -42,7 +41,6 @@ error: this if statement can be collapsed
23 | | } 23 | | }
24 | | } 24 | | }
| |_____^ | |_____^
|
help: try help: try
| |
20 | if x == "hello" && x == "world" && (y == "world" || y == "hello") { 20 | if x == "hello" && x == "world" && (y == "world" || y == "hello") {
@ -59,7 +57,6 @@ error: this if statement can be collapsed
29 | | } 29 | | }
30 | | } 30 | | }
| |_____^ | |_____^
|
help: try help: try
| |
26 | if (x == "hello" || x == "world") && y == "world" && y == "hello" { 26 | if (x == "hello" || x == "world") && y == "world" && y == "hello" {
@ -76,7 +73,6 @@ error: this if statement can be collapsed
35 | | } 35 | | }
36 | | } 36 | | }
| |_____^ | |_____^
|
help: try help: try
| |
32 | if x == "hello" && x == "world" && y == "world" && y == "hello" { 32 | if x == "hello" && x == "world" && y == "world" && y == "hello" {
@ -93,7 +89,6 @@ error: this if statement can be collapsed
41 | | } 41 | | }
42 | | } 42 | | }
| |_____^ | |_____^
|
help: try help: try
| |
38 | if 42 == 1337 && 'a' != 'A' { 38 | if 42 == 1337 && 'a' != 'A' {
@ -111,7 +106,6 @@ error: this `else { if .. }` block can be collapsed
50 | | } 50 | | }
51 | | } 51 | | }
| |_____^ | |_____^
|
help: try help: try
| |
47 | } else if y == "world" { 47 | } else if y == "world" {
@ -129,7 +123,6 @@ error: this `else { if .. }` block can be collapsed
58 | | } 58 | | }
59 | | } 59 | | }
| |_____^ | |_____^
|
help: try help: try
| |
55 | } else if let Some(42) = Some(42) { 55 | } else if let Some(42) = Some(42) {
@ -149,7 +142,6 @@ error: this `else { if .. }` block can be collapsed
69 | | } 69 | | }
70 | | } 70 | | }
| |_____^ | |_____^
|
help: try help: try
| |
63 | } else if y == "world" { 63 | } else if y == "world" {
@ -172,7 +164,6 @@ error: this `else { if .. }` block can be collapsed
80 | | } 80 | | }
81 | | } 81 | | }
| |_____^ | |_____^
|
help: try help: try
| |
74 | } else if let Some(42) = Some(42) { 74 | } else if let Some(42) = Some(42) {
@ -195,7 +186,6 @@ error: this `else { if .. }` block can be collapsed
91 | | } 91 | | }
92 | | } 92 | | }
| |_____^ | |_____^
|
help: try help: try
| |
85 | } else if let Some(42) = Some(42) { 85 | } else if let Some(42) = Some(42) {
@ -218,7 +208,6 @@ error: this `else { if .. }` block can be collapsed
102 | | } 102 | | }
103 | | } 103 | | }
| |_____^ | |_____^
|
help: try help: try
| |
96 | } else if x == "hello" { 96 | } else if x == "hello" {
@ -241,7 +230,6 @@ error: this `else { if .. }` block can be collapsed
113 | | } 113 | | }
114 | | } 114 | | }
| |_____^ | |_____^
|
help: try help: try
| |
107 | } else if let Some(42) = Some(42) { 107 | } else if let Some(42) = Some(42) {

View File

@ -91,7 +91,6 @@ error: the loop variable `i` is only used to index `vec`.
96 | | let _ = vec[i]; 96 | | let _ = vec[i];
97 | | } 97 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
95 | for <item> in &vec { 95 | for <item> in &vec {
@ -104,7 +103,6 @@ error: the loop variable `j` is only used to index `STATIC`.
101 | | println!("{:?}", STATIC[j]); 101 | | println!("{:?}", STATIC[j]);
102 | | } 102 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
100 | for <item> in STATIC.iter().take(4) { 100 | for <item> in STATIC.iter().take(4) {
@ -117,7 +115,6 @@ error: the loop variable `j` is only used to index `CONST`.
105 | | println!("{:?}", CONST[j]); 105 | | println!("{:?}", CONST[j]);
106 | | } 106 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
104 | for <item> in CONST.iter().take(4) { 104 | for <item> in CONST.iter().take(4) {
@ -130,7 +127,6 @@ error: the loop variable `i` is used to index `vec`
109 | | println!("{} {}", vec[i], i); 109 | | println!("{} {}", vec[i], i);
110 | | } 110 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
108 | for (i, <item>) in vec.iter().enumerate() { 108 | for (i, <item>) in vec.iter().enumerate() {
@ -143,7 +139,6 @@ error: the loop variable `i` is only used to index `vec2`.
117 | | println!("{}", vec2[i]); 117 | | println!("{}", vec2[i]);
118 | | } 118 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
116 | for <item> in vec2.iter().take(vec.len()) { 116 | for <item> 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]); 121 | | println!("{}", vec[i]);
122 | | } 122 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
120 | for <item> in vec.iter().skip(5) { 120 | for <item> in vec.iter().skip(5) {
@ -169,7 +163,6 @@ error: the loop variable `i` is only used to index `vec`.
125 | | println!("{}", vec[i]); 125 | | println!("{}", vec[i]);
126 | | } 126 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
124 | for <item> in vec.iter().take(MAX_LEN) { 124 | for <item> 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]); 129 | | println!("{}", vec[i]);
130 | | } 130 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
128 | for <item> in vec.iter().take(MAX_LEN + 1) { 128 | for <item> 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]); 133 | | println!("{}", vec[i]);
134 | | } 134 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
132 | for <item> in vec.iter().take(10).skip(5) { 132 | for <item> 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]); 137 | | println!("{}", vec[i]);
138 | | } 138 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
136 | for <item> in vec.iter().take(10 + 1).skip(5) { 136 | for <item> 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); 141 | | println!("{} {}", vec[i], i);
142 | | } 142 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
140 | for (i, <item>) in vec.iter().enumerate().skip(5) { 140 | for (i, <item>) 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); 145 | | println!("{} {}", vec[i], i);
146 | | } 146 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
144 | for (i, <item>) in vec.iter().enumerate().take(10).skip(5) { 144 | for (i, <item>) 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); 153 | | println!("{}", i);
154 | | } 154 | | }
| |_____^ | |_____^
|
help: consider using the following if you are attempting to iterate over this range in reverse help: consider using the following if you are attempting to iterate over this range in reverse
| |
152 | for i in (0...10).rev() { 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); 157 | | println!("{}", i);
158 | | } 158 | | }
| |_____^ | |_____^
|
help: consider using the following if you are attempting to iterate over this range in reverse help: consider using the following if you are attempting to iterate over this range in reverse
| |
156 | for i in (0..MAX_LEN).rev() { 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); 186 | | println!("{}", i);
187 | | } 187 | | }
| |_____^ | |_____^
|
help: consider using the following if you are attempting to iterate over this range in reverse help: consider using the following if you are attempting to iterate over this range in reverse
| |
185 | for i in (5 + 4..10).rev() { 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); 190 | | println!("{}", i);
191 | | } 191 | | }
| |_____^ | |_____^
|
help: consider using the following if you are attempting to iterate over this range in reverse 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() { 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 394 | | // `in *m.values()` as we used to
395 | | } 395 | | }
| |_____^ | |_____^
|
help: use the corresponding method help: use the corresponding method
| |
390 | for v in (*m).values() { 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; 399 | | let _v = v;
400 | | } 400 | | }
| |_____^ | |_____^
|
help: use the corresponding method help: use the corresponding method
| |
398 | for v in m.values_mut() { 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; 404 | | let _v = v;
405 | | } 405 | | }
| |_____^ | |_____^
|
help: use the corresponding method help: use the corresponding method
| |
403 | for v in (*m).values_mut() { 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; 410 | | let _k = k;
411 | | } 411 | | }
| |_____^ | |_____^
|
help: use the corresponding method help: use the corresponding method
| |
409 | for k in rm.keys() { 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] 497 | | dst2[i + 500] = src[i]
498 | | } 498 | | }
| |_____^ | |_____^
|
help: try replacing the loop by help: try replacing the loop by
| |
495 | dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)]) 495 | dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)])

View File

@ -19,7 +19,6 @@ error: impl for `HashMap` should be generalized over different hashers
| |
20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) { 20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
|
help: consider adding a type parameter help: consider adding a type parameter
| |
20 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) { 20 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
@ -34,7 +33,6 @@ error: impl for `HashMap` should be generalized over different hashers
| |
25 | impl Foo<i16> for HashMap<String, String> { 25 | impl Foo<i16> for HashMap<String, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider adding a type parameter help: consider adding a type parameter
| |
25 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> { 25 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
@ -49,7 +47,6 @@ error: impl for `HashSet` should be generalized over different hashers
| |
43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> { 43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
| ^^^^^^^^^^ | ^^^^^^^^^^
|
help: consider adding a type parameter help: consider adding a type parameter
| |
43 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> { 43 | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
@ -64,7 +61,6 @@ error: impl for `HashSet` should be generalized over different hashers
| |
48 | impl Foo<i16> for HashSet<String> { 48 | impl Foo<i16> for HashSet<String> {
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
|
help: consider adding a type parameter help: consider adding a type parameter
| |
48 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> { 48 | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
@ -79,7 +75,6 @@ error: parameter of type `HashMap` should be generalized over different hashers
| |
65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) { 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
|
help: consider adding a type parameter help: consider adding a type parameter
| |
65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) { 65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {
@ -90,7 +85,6 @@ error: parameter of type `HashSet` should be generalized over different hashers
| |
65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) { 65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
|
help: consider adding a type parameter help: consider adding a type parameter
| |
65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) { 65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {
@ -104,7 +98,6 @@ error: impl for `HashMap` should be generalized over different hashers
... ...
83 | gen!(impl); 83 | gen!(impl);
| ----------- in this macro invocation | ----------- in this macro invocation
|
help: consider adding a type parameter help: consider adding a type parameter
| |
70 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> { 70 | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
@ -122,7 +115,6 @@ error: parameter of type `HashMap` should be generalized over different hashers
... ...
84 | gen!(fn bar); 84 | gen!(fn bar);
| ------------- in this macro invocation | ------------- in this macro invocation
|
help: consider adding a type parameter help: consider adding a type parameter
| |
78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) { 78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {
@ -136,7 +128,6 @@ error: parameter of type `HashSet` should be generalized over different hashers
... ...
84 | gen!(fn bar); 84 | gen!(fn bar);
| ------------- in this macro invocation | ------------- in this macro invocation
|
help: consider adding a type parameter help: consider adding a type parameter
| |
78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) { 78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {

View File

@ -15,7 +15,6 @@ error: Unnecessary `>= y + 1` or `x - 1 >=`
| |
11 | y + 1 <= x; 11 | y + 1 <= x;
| ^^^^^^^^^^ | ^^^^^^^^^^
|
help: change `>= y + 1` to `> y` as shown help: change `>= y + 1` to `> y` as shown
| |
11 | y < x; 11 | y < x;
@ -26,7 +25,6 @@ error: Unnecessary `>= y + 1` or `x - 1 >=`
| |
13 | x - 1 >= y; 13 | x - 1 >= y;
| ^^^^^^^^^^ | ^^^^^^^^^^
|
help: change `>= y + 1` to `> y` as shown help: change `>= y + 1` to `> y` as shown
| |
13 | x > y; 13 | x > y;
@ -37,7 +35,6 @@ error: Unnecessary `>= y + 1` or `x - 1 >=`
| |
14 | y <= x - 1; 14 | y <= x - 1;
| ^^^^^^^^^^ | ^^^^^^^^^^
|
help: change `>= y + 1` to `> y` as shown help: change `>= y + 1` to `> y` as shown
| |
14 | y < x; 14 | y < x;

View File

@ -27,7 +27,6 @@ error: large size difference between variants
| |
34 | ContainingLargeEnum(LargeEnum), 34 | ContainingLargeEnum(LargeEnum),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider boxing the large fields to reduce the total size of the enum help: consider boxing the large fields to reduce the total size of the enum
| |
34 | ContainingLargeEnum(Box<LargeEnum>), 34 | ContainingLargeEnum(Box<LargeEnum>),
@ -62,7 +61,6 @@ error: large size difference between variants
| |
49 | StructLikeLarge2 { x: [i32; 8000] }, 49 | StructLikeLarge2 { x: [i32; 8000] },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider boxing the large fields to reduce the total size of the enum help: consider boxing the large fields to reduce the total size of the enum
| |
49 | StructLikeLarge2 { x: Box<[i32; 8000]> }, 49 | StructLikeLarge2 { x: Box<[i32; 8000]> },

View File

@ -77,7 +77,6 @@ error: this is a decimal constant
| |
30 | let fail8 = 0123; 30 | let fail8 = 0123;
| ^^^^ | ^^^^
|
help: if you mean to use a decimal constant, remove the `0` to remove confusion help: if you mean to use a decimal constant, remove the `0` to remove confusion
| |
30 | let fail8 = 123; 30 | let fail8 = 123;

View File

@ -143,7 +143,6 @@ error: you don't need to add `&` to all patterns
150 | | _ => println!("none"), 150 | | _ => println!("none"),
151 | | } 151 | | }
| |_____^ | |_____^
|
help: instead of prefixing all patterns with `&`, you can dereference the expression help: instead of prefixing all patterns with `&`, you can dereference the expression
| |
148 | match *tup { .. } 148 | match *tup { .. }
@ -165,7 +164,6 @@ error: you don't need to add `&` to all patterns
166 | | println!("none"); 166 | | println!("none");
167 | | } 167 | | }
| |_____^ | |_____^
|
help: instead of prefixing all patterns with `&`, you can dereference the expression help: instead of prefixing all patterns with `&`, you can dereference the expression
| |
165 | if let .. = *a { .. } 165 | if let .. = *a { .. }

View File

@ -212,7 +212,6 @@ error: called `map_or(None, f)` on an Option value. This can be done more direct
151 | | } 151 | | }
152 | | ); 152 | | );
| |_________________^ | |_________________^
|
help: try using and_then instead help: try using and_then instead
| |
149 | let _ = opt.and_then(|x| { 149 | let _ = opt.and_then(|x| {

View File

@ -29,7 +29,6 @@ error: this argument is passed by value, but not consumed in the function body
| |
44 | fn test_match(x: Option<Option<String>>, y: Option<Option<String>>) { 44 | fn test_match(x: Option<Option<String>>, y: Option<Option<String>>) {
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
|
help: consider taking a reference instead help: consider taking a reference instead
| |
44 | fn test_match(x: &Option<Option<String>>, y: Option<Option<String>>) { 44 | fn test_match(x: &Option<Option<String>>, y: Option<Option<String>>) {
@ -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) { 57 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
| ^^^^^^^ | ^^^^^^^
|
help: consider taking a reference instead help: consider taking a reference instead
| |
57 | fn test_destructure(x: Wrapper, y: &Wrapper, z: Wrapper) { 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<i32>, v: Vec<i32>) { 75 | fn issue_2114(s: String, t: String, u: Vec<i32>, v: Vec<i32>) {
| ^^^^^^ | ^^^^^^
|
help: consider changing the type to help: consider changing the type to
| |
75 | fn issue_2114(s: String, t: &str, u: Vec<i32>, v: Vec<i32>) { 75 | fn issue_2114(s: String, t: &str, u: Vec<i32>, v: Vec<i32>) {
@ -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<i32>, v: Vec<i32>) { 75 | fn issue_2114(s: String, t: String, u: Vec<i32>, v: Vec<i32>) {
| ^^^^^^^^ | ^^^^^^^^
|
help: consider changing the type to help: consider changing the type to
| |
75 | fn issue_2114(s: String, t: String, u: Vec<i32>, v: &[i32]) { 75 | fn issue_2114(s: String, t: String, u: Vec<i32>, v: &[i32]) {

View File

@ -19,7 +19,6 @@ error: the loop variable `i` is only used to index `ms`.
30 | | ms[i] *= 2; 30 | | ms[i] *= 2;
31 | | } 31 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
29 | for <item> in &mut ms { 29 | for <item> in &mut ms {
@ -33,7 +32,6 @@ error: the loop variable `i` is only used to index `ms`.
37 | | *x *= 2; 37 | | *x *= 2;
38 | | } 38 | | }
| |_____^ | |_____^
|
help: consider using an iterator help: consider using an iterator
| |
35 | for <item> in &mut ms { 35 | for <item> in &mut ms {

View File

@ -15,7 +15,6 @@ error: you should consider deriving a `Default` implementation for `Bar`
| |
16 | pub fn new() -> Self { Bar } 16 | pub fn new() -> Self { Bar }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: try this help: try this
| |
13 | #[derive(Default)] 13 | #[derive(Default)]

View File

@ -23,7 +23,6 @@ error: writing `&Vec<_>` instead of `&[_]` involves one more reference and canno
| |
40 | fn cloned(x: &Vec<u8>) -> Vec<u8> { 40 | fn cloned(x: &Vec<u8>) -> Vec<u8> {
| ^^^^^^^^ | ^^^^^^^^
|
help: change this to help: change this to
| |
40 | fn cloned(x: &[u8]) -> Vec<u8> { 40 | fn cloned(x: &[u8]) -> Vec<u8> {
@ -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 { 49 | fn str_cloned(x: &String) -> String {
| ^^^^^^^ | ^^^^^^^
|
help: change this to help: change this to
| |
49 | fn str_cloned(x: &str) -> String { 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<u8>, y: &String) { 59 | fn false_positive_capacity(x: &Vec<u8>, y: &String) {
| ^^^^^^^ | ^^^^^^^
|
help: change this to help: change this to
| |
59 | fn false_positive_capacity(x: &Vec<u8>, y: &str) { 59 | fn false_positive_capacity(x: &Vec<u8>, y: &str) {