Skip to content

Commit ae6ea84

Browse files
committed
Fix tests from 40349b2
1 parent 5d9ca00 commit ae6ea84

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

tests/ui/matches.stderr

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,7 @@ error: you seem to be trying to use match for destructuring a single pattern. Co
3333
41 | | &(v, 1) => println!("{}", v),
3434
42 | | _ => println!("none"),
3535
43 | | }
36-
| |_____^
37-
help: try this
38-
|
39-
40 | if let &(v, 1) = tup {
40-
41 | # [ cfg ( not ( stage0 ) ) ] {
41-
42 | ( $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ) ; } # [
42-
43 | cfg ( stage0 ) ] { print ! ( "{}/n" , format_args ! ( $ ( $ arg ) * ) ) } } else {
43-
44 | ( $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ) ; }
44-
|
36+
| |_____^ help: try this: `if let &(v, 1) = tup { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; } else { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }`
4537

4638
error: you don't need to add `&` to all patterns
4739
--> $DIR/matches.rs:40:5

tests/ui/redundant_field_names.stderr

+31-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,36 @@ error: redundant field names in struct initialization
1212
35 | age: age,
1313
| ^^^^^^^^ help: replace it with: `age`
1414

15+
error: redundant field names in struct initialization
16+
--> $DIR/redundant_field_names.rs:45:13
17+
|
18+
45 | let _ = start..;
19+
| ^^^^^ help: replace it with: `start`
20+
21+
error: redundant field names in struct initialization
22+
--> $DIR/redundant_field_names.rs:46:15
23+
|
24+
46 | let _ = ..end;
25+
| ^^^ help: replace it with: `end`
26+
27+
error: redundant field names in struct initialization
28+
--> $DIR/redundant_field_names.rs:47:13
29+
|
30+
47 | let _ = start..end;
31+
| ^^^^^ help: replace it with: `start`
32+
33+
error: redundant field names in struct initialization
34+
--> $DIR/redundant_field_names.rs:47:20
35+
|
36+
47 | let _ = start..end;
37+
| ^^^ help: replace it with: `end`
38+
39+
error: redundant field names in struct initialization
40+
--> $DIR/redundant_field_names.rs:49:16
41+
|
42+
49 | let _ = ..=end;
43+
| ^^^ help: replace it with: `end`
44+
1545
error: redundant field names in struct initialization
1646
--> $DIR/redundant_field_names.rs:53:25
1747
|
@@ -42,5 +72,5 @@ error: redundant field names in struct initialization
4272
57 | let _ = RangeToInclusive { end: end };
4373
| ^^^^^^^^ help: replace it with: `end`
4474

45-
error: aborting due to 7 previous errors
75+
error: aborting due to 12 previous errors
4676

0 commit comments

Comments
 (0)