Skip to content

Commit d8afe2c

Browse files
committed
Update tests
1 parent 197664e commit d8afe2c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/ui/eta.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ error: this expression borrows a reference that is immediately dereferenced by t
2222
--> $DIR/eta.rs:11:21
2323
|
2424
11 | all(&[1, 2, 3], &&2, |x, y| below(x, y)); //is adjusted
25-
| ^^^
25+
| ^^^ help: change this to: `&2`
2626
|
2727
= note: `-D needless-borrow` implied by `-D warnings`
2828

tests/ui/needless_borrow.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ error: this expression borrows a reference that is immediately dereferenced by t
22
--> $DIR/needless_borrow.rs:13:15
33
|
44
13 | let c = x(&&a);
5-
| ^^^
5+
| ^^^ help: change this to: `&a`
66
|
77
= note: `-D needless-borrow` implied by `-D warnings`
88

99
error: this pattern creates a reference to a reference
1010
--> $DIR/needless_borrow.rs:20:17
1111
|
1212
20 | if let Some(ref cake) = Some(&5) {}
13-
| ^^^^^^^^
13+
| ^^^^^^^^ help: change this to: `cake`
1414

1515
error: this expression borrows a reference that is immediately dereferenced by the compiler
1616
--> $DIR/needless_borrow.rs:27:15
1717
|
1818
27 | 46 => &&a,
19-
| ^^^
19+
| ^^^ help: change this to: `&a`
2020

2121
error: this pattern takes a reference on something that is being de-referenced
2222
--> $DIR/needless_borrow.rs:49:34
@@ -36,7 +36,7 @@ error: this pattern creates a reference to a reference
3636
--> $DIR/needless_borrow.rs:50:31
3737
|
3838
50 | let _ = v.iter().filter(|&ref a| a.is_empty());
39-
| ^^^^^
39+
| ^^^^^ help: change this to: `a`
4040

4141
error: aborting due to 6 previous errors
4242

0 commit comments

Comments
 (0)