Update ui test for the new E0530 suggestion
This commit is contained in:
parent
c2436d54d0
commit
1b32eb34b3
5 changed files with 25 additions and 8 deletions
|
@ -926,8 +926,7 @@ impl<'a> Resolver<'a> {
|
||||||
"try specify the pattern arguments",
|
"try specify the pattern arguments",
|
||||||
format!("{}(..)", name),
|
format!("{}(..)", name),
|
||||||
Applicability::Unspecified,
|
Applicability::Unspecified,
|
||||||
)
|
);
|
||||||
.emit();
|
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,10 @@ LL | struct Empty2();
|
||||||
| ---------------- the tuple struct `Empty2` is defined here
|
| ---------------- the tuple struct `Empty2` is defined here
|
||||||
...
|
...
|
||||||
LL | Empty2 => ()
|
LL | Empty2 => ()
|
||||||
| ^^^^^^ cannot be named the same as a tuple struct
|
| ^^^^^^
|
||||||
|
| |
|
||||||
|
| cannot be named the same as a tuple struct
|
||||||
|
| help: try specify the pattern arguments: `Empty2(..)`
|
||||||
|
|
||||||
error[E0530]: match bindings cannot shadow tuple structs
|
error[E0530]: match bindings cannot shadow tuple structs
|
||||||
--> $DIR/empty-struct-tuple-pat.rs:25:9
|
--> $DIR/empty-struct-tuple-pat.rs:25:9
|
||||||
|
@ -14,7 +17,10 @@ LL | use empty_struct::*;
|
||||||
| --------------- the tuple struct `XEmpty6` is imported here
|
| --------------- the tuple struct `XEmpty6` is imported here
|
||||||
...
|
...
|
||||||
LL | XEmpty6 => ()
|
LL | XEmpty6 => ()
|
||||||
| ^^^^^^^ cannot be named the same as a tuple struct
|
| ^^^^^^^
|
||||||
|
| |
|
||||||
|
| cannot be named the same as a tuple struct
|
||||||
|
| help: try specify the pattern arguments: `XEmpty6(..)`
|
||||||
|
|
||||||
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
|
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
|
||||||
--> $DIR/empty-struct-tuple-pat.rs:29:9
|
--> $DIR/empty-struct-tuple-pat.rs:29:9
|
||||||
|
|
|
@ -5,7 +5,10 @@ LL | use declarations_for_tuple_field_count_errors::*;
|
||||||
| -------------------------------------------- the tuple struct `Z1` is imported here
|
| -------------------------------------------- the tuple struct `Z1` is imported here
|
||||||
...
|
...
|
||||||
LL | Z1 => {}
|
LL | Z1 => {}
|
||||||
| ^^ cannot be named the same as a tuple struct
|
| ^^
|
||||||
|
| |
|
||||||
|
| cannot be named the same as a tuple struct
|
||||||
|
| help: try specify the pattern arguments: `Z1(..)`
|
||||||
|
|
||||||
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
|
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
|
||||||
--> $DIR/pat-tuple-field-count-cross.rs:9:9
|
--> $DIR/pat-tuple-field-count-cross.rs:9:9
|
||||||
|
|
|
@ -5,7 +5,10 @@ LL | struct Z1();
|
||||||
| ------------ the tuple struct `Z1` is defined here
|
| ------------ the tuple struct `Z1` is defined here
|
||||||
...
|
...
|
||||||
LL | Z1 => {}
|
LL | Z1 => {}
|
||||||
| ^^ cannot be named the same as a tuple struct
|
| ^^
|
||||||
|
| |
|
||||||
|
| cannot be named the same as a tuple struct
|
||||||
|
| help: try specify the pattern arguments: `Z1(..)`
|
||||||
|
|
||||||
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
|
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
|
||||||
--> $DIR/pat-tuple-overfield.rs:52:9
|
--> $DIR/pat-tuple-overfield.rs:52:9
|
||||||
|
|
|
@ -5,7 +5,10 @@ LL | struct TupleStruct();
|
||||||
| --------------------- the tuple struct `TupleStruct` is defined here
|
| --------------------- the tuple struct `TupleStruct` is defined here
|
||||||
...
|
...
|
||||||
LL | TupleStruct => {}
|
LL | TupleStruct => {}
|
||||||
| ^^^^^^^^^^^ cannot be named the same as a tuple struct
|
| ^^^^^^^^^^^
|
||||||
|
| |
|
||||||
|
| cannot be named the same as a tuple struct
|
||||||
|
| help: try specify the pattern arguments: `TupleStruct(..)`
|
||||||
|
|
||||||
error[E0530]: match bindings cannot shadow tuple variants
|
error[E0530]: match bindings cannot shadow tuple variants
|
||||||
--> $DIR/pattern-binding-disambiguation.rs:33:9
|
--> $DIR/pattern-binding-disambiguation.rs:33:9
|
||||||
|
@ -14,7 +17,10 @@ LL | use E::*;
|
||||||
| ---- the tuple variant `TupleVariant` is imported here
|
| ---- the tuple variant `TupleVariant` is imported here
|
||||||
...
|
...
|
||||||
LL | TupleVariant => {}
|
LL | TupleVariant => {}
|
||||||
| ^^^^^^^^^^^^ cannot be named the same as a tuple variant
|
| ^^^^^^^^^^^^
|
||||||
|
| |
|
||||||
|
| cannot be named the same as a tuple variant
|
||||||
|
| help: try specify the pattern arguments: `TupleVariant(..)`
|
||||||
|
|
||||||
error[E0530]: match bindings cannot shadow struct variants
|
error[E0530]: match bindings cannot shadow struct variants
|
||||||
--> $DIR/pattern-binding-disambiguation.rs:36:9
|
--> $DIR/pattern-binding-disambiguation.rs:36:9
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue