AST/HIR: Merge field access expressions for named and numeric fields
This commit is contained in:
parent
6c537493d0
commit
44acea4d88
43 changed files with 105 additions and 432 deletions
|
|
@ -24,7 +24,7 @@ macro_rules! fake_field_stmt {
|
|||
|
||||
macro_rules! fake_anon_field_stmt {
|
||||
() => {
|
||||
(1).0 //~ ERROR no field
|
||||
(1).0 //~ ERROR doesn't have fields
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ macro_rules! fake_field_expr {
|
|||
|
||||
macro_rules! fake_anon_field_expr {
|
||||
() => {
|
||||
(1).0 //~ ERROR no field
|
||||
(1).0 //~ ERROR doesn't have fields
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ LL | 1.fake //~ ERROR doesn't have fields
|
|||
LL | fake_field_stmt!();
|
||||
| ------------------- in this macro invocation
|
||||
|
||||
error[E0609]: no field `0` on type `{integer}`
|
||||
--> $DIR/macro-backtrace-invalid-internals.rs:27:11
|
||||
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
|
||||
--> $DIR/macro-backtrace-invalid-internals.rs:27:15
|
||||
|
|
||||
LL | (1).0 //~ ERROR no field
|
||||
| ^^^^^
|
||||
LL | (1).0 //~ ERROR doesn't have fields
|
||||
| ^
|
||||
...
|
||||
LL | fake_anon_field_stmt!();
|
||||
| ------------------------ in this macro invocation
|
||||
|
|
@ -56,11 +56,11 @@ LL | 1.fake //~ ERROR doesn't have fields
|
|||
LL | let _ = fake_field_expr!();
|
||||
| ------------------ in this macro invocation
|
||||
|
||||
error[E0609]: no field `0` on type `{integer}`
|
||||
--> $DIR/macro-backtrace-invalid-internals.rs:45:11
|
||||
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
|
||||
--> $DIR/macro-backtrace-invalid-internals.rs:45:15
|
||||
|
|
||||
LL | (1).0 //~ ERROR no field
|
||||
| ^^^^^
|
||||
LL | (1).0 //~ ERROR doesn't have fields
|
||||
| ^
|
||||
...
|
||||
LL | let _ = fake_anon_field_expr!();
|
||||
| ----------------------- in this macro invocation
|
||||
|
|
@ -80,5 +80,5 @@ LL | 2.0_f32.powi(2) //~ ERROR can't call method `powi` on ambiguous n
|
|||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
Some errors occurred: E0599, E0609, E0610, E0689.
|
||||
Some errors occurred: E0599, E0610, E0689.
|
||||
For more information about an error, try `rustc --explain E0599`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue