diff --git a/tests/ui/matches.stderr b/tests/ui/matches.stderr index 5bfc3271c45..61c13056cca 100644 --- a/tests/ui/matches.stderr +++ b/tests/ui/matches.stderr @@ -33,15 +33,7 @@ error: you seem to be trying to use match for destructuring a single pattern. Co 41 | | &(v, 1) => println!("{}", v), 42 | | _ => println!("none"), 43 | | } - | |_____^ -help: try this - | -40 | if let &(v, 1) = tup { -41 | # [ cfg ( not ( stage0 ) ) ] { -42 | ( $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ) ; } # [ -43 | cfg ( stage0 ) ] { print ! ( "{}/n" , format_args ! ( $ ( $ arg ) * ) ) } } else { -44 | ( $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ) ; } - | + | |_____^ help: try this: `if let &(v, 1) = tup { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; } else { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; }` error: you don't need to add `&` to all patterns --> $DIR/matches.rs:40:5 diff --git a/tests/ui/redundant_field_names.stderr b/tests/ui/redundant_field_names.stderr index d757f1871a7..4f706d1fe08 100644 --- a/tests/ui/redundant_field_names.stderr +++ b/tests/ui/redundant_field_names.stderr @@ -12,6 +12,36 @@ error: redundant field names in struct initialization 35 | age: age, | ^^^^^^^^ help: replace it with: `age` +error: redundant field names in struct initialization + --> $DIR/redundant_field_names.rs:45:13 + | +45 | let _ = start..; + | ^^^^^ help: replace it with: `start` + +error: redundant field names in struct initialization + --> $DIR/redundant_field_names.rs:46:15 + | +46 | let _ = ..end; + | ^^^ help: replace it with: `end` + +error: redundant field names in struct initialization + --> $DIR/redundant_field_names.rs:47:13 + | +47 | let _ = start..end; + | ^^^^^ help: replace it with: `start` + +error: redundant field names in struct initialization + --> $DIR/redundant_field_names.rs:47:20 + | +47 | let _ = start..end; + | ^^^ help: replace it with: `end` + +error: redundant field names in struct initialization + --> $DIR/redundant_field_names.rs:49:16 + | +49 | let _ = ..=end; + | ^^^ help: replace it with: `end` + error: redundant field names in struct initialization --> $DIR/redundant_field_names.rs:53:25 | @@ -42,5 +72,5 @@ error: redundant field names in struct initialization 57 | let _ = RangeToInclusive { end: end }; | ^^^^^^^^ help: replace it with: `end` -error: aborting due to 7 previous errors +error: aborting due to 12 previous errors