Skip to content

Commit 426faff

Browse files
committed
Fix travis and test+stderr files again
1 parent 059019a commit 426faff

File tree

3 files changed

+70
-12
lines changed

3 files changed

+70
-12
lines changed

ci/base-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ if [ "${tests_need_reformatting}" == "true" ] ; then
7575
fi
7676

7777
# switch back to master
78-
rustup override set master
78+
# rustup override set master

tests/ui/eta.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
)]
1010
#![warn(
1111
clippy::redundant_closure,
12-
redundant_closures_for_method_calls,
12+
clippy::redundant_closure_for_method_calls,
1313
clippy::needless_borrow
1414
)]
1515

tests/ui/eta.stderr

+68-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,74 @@
1-
error: unknown lint: `redundant_closures_for_method_calls`
2-
--> $DIR/eta.rs:12:5
1+
error: redundant closure found
2+
--> $DIR/eta.rs:19:27
33
|
4-
LL | redundant_closures_for_method_calls,
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::redundant_closure_for_method_calls`
4+
LL | let a = Some(1u8).map(|a| foo(a));
5+
| ^^^^^^^^^^ help: remove closure as shown: `foo`
66
|
7-
= note: `-D unknown-lints` implied by `-D warnings`
7+
= note: `-D clippy::redundant-closure` implied by `-D warnings`
88

9-
error: unknown lint: `redundant_closures_for_method_calls`
10-
--> $DIR/eta.rs:12:5
9+
error: redundant closure found
10+
--> $DIR/eta.rs:20:10
1111
|
12-
LL | redundant_closures_for_method_calls,
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::redundant_closure_for_method_calls`
12+
LL | meta(|a| foo(a));
13+
| ^^^^^^^^^^ help: remove closure as shown: `foo`
1414

15-
error: aborting due to 2 previous errors
15+
error: redundant closure found
16+
--> $DIR/eta.rs:21:27
17+
|
18+
LL | let c = Some(1u8).map(|a| {1+2; foo}(a));
19+
| ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `{1+2; foo}`
20+
21+
error: this expression borrows a reference that is immediately dereferenced by the compiler
22+
--> $DIR/eta.rs:23:21
23+
|
24+
LL | all(&[1, 2, 3], &&2, |x, y| below(x, y)); //is adjusted
25+
| ^^^ help: change this to: `&2`
26+
|
27+
= note: `-D clippy::needless-borrow` implied by `-D warnings`
28+
29+
error: redundant closure found
30+
--> $DIR/eta.rs:30:27
31+
|
32+
LL | let e = Some(1u8).map(|a| generic(a));
33+
| ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
34+
35+
error: redundant closure found
36+
--> $DIR/eta.rs:73:51
37+
|
38+
LL | let e = Some(TestStruct { some_ref: &i }).map(|a| a.foo());
39+
| ^^^^^^^^^^^ help: remove closure as shown: `TestStruct::foo`
40+
|
41+
= note: `-D clippy::redundant-closure-for-method-calls` implied by `-D warnings`
42+
43+
error: redundant closure found
44+
--> $DIR/eta.rs:75:51
45+
|
46+
LL | let e = Some(TestStruct { some_ref: &i }).map(|a| a.trait_foo());
47+
| ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `TestTrait::trait_foo`
48+
49+
error: redundant closure found
50+
--> $DIR/eta.rs:78:42
51+
|
52+
LL | let e = Some(&mut vec![1, 2, 3]).map(|v| v.clear());
53+
| ^^^^^^^^^^^^^ help: remove closure as shown: `std::vec::Vec::clear`
54+
55+
error: redundant closure found
56+
--> $DIR/eta.rs:83:29
57+
|
58+
LL | let e = Some("str").map(|s| s.to_string());
59+
| ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `std::string::ToString::to_string`
60+
61+
error: redundant closure found
62+
--> $DIR/eta.rs:85:27
63+
|
64+
LL | let e = Some('a').map(|s| s.to_uppercase());
65+
| ^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `char::to_uppercase`
66+
67+
error: redundant closure found
68+
--> $DIR/eta.rs:88:65
69+
|
70+
LL | let e: std::vec::Vec<char> = vec!['a', 'b', 'c'].iter().map(|c| c.to_ascii_uppercase()).collect();
71+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `char::to_ascii_uppercase`
72+
73+
error: aborting due to 11 previous errors
1674

0 commit comments

Comments
 (0)