Make Node::ExprField a child of Node::Expr.
This was incorrectly inserting the ExprField as a sibling of the struct expression. This required adjusting various parts which were looking at parent node of a field expression to find the struct.
This commit is contained in:
parent
dcd5177fd4
commit
7b36047239
5 changed files with 139 additions and 148 deletions
|
|
@ -25,7 +25,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - type BareFnPtr = fn(#[deny(unused_parens)](i32));
|
||||
LL + type BareFnPtr = fn(#[deny(unused_parens)]i32);
|
||||
|
|
||||
|
|
||||
|
||||
error: type `ITEM_OUTER` should have an upper camel case name
|
||||
--> $DIR/lint-attr-everywhere-early.rs:30:8
|
||||
|
|
@ -198,7 +198,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - type assoc_type = (i32);
|
||||
LL + type assoc_type = i32;
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary parentheses around type
|
||||
--> $DIR/lint-attr-everywhere-early.rs:87:31
|
||||
|
|
@ -215,7 +215,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - #[deny(unused_parens)]f1: (i32),
|
||||
LL + #[deny(unused_parens)]f1: i32,
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary parentheses around type
|
||||
--> $DIR/lint-attr-everywhere-early.rs:89:42
|
||||
|
|
@ -232,7 +232,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - struct StructTuple(#[deny(unused_parens)](i32));
|
||||
LL + struct StructTuple(#[deny(unused_parens)]i32);
|
||||
|
|
||||
|
|
||||
|
||||
error: variant `VARIANT_CAMEL` should have an upper camel case name
|
||||
--> $DIR/lint-attr-everywhere-early.rs:93:5
|
||||
|
|
@ -261,7 +261,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - fn foreign_denied_from_inner(x: (i32));
|
||||
LL + fn foreign_denied_from_inner(x: i32);
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary parentheses around type
|
||||
--> $DIR/lint-attr-everywhere-early.rs:104:37
|
||||
|
|
@ -278,7 +278,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - fn foreign_denied_from_outer(x: (i32));
|
||||
LL + fn foreign_denied_from_outer(x: i32);
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary parentheses around type
|
||||
--> $DIR/lint-attr-everywhere-early.rs:107:43
|
||||
|
|
@ -295,7 +295,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - fn function(#[deny(unused_parens)] param: (i32)) {}
|
||||
LL + fn function(#[deny(unused_parens)] param: i32) {}
|
||||
|
|
||||
|
|
||||
|
||||
error: type parameter `foo` should have an upper camel case name
|
||||
--> $DIR/lint-attr-everywhere-early.rs:109:42
|
||||
|
|
@ -324,7 +324,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - let x = (1);
|
||||
LL + let x = 1;
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary parentheses around type
|
||||
--> $DIR/lint-attr-everywhere-early.rs:121:50
|
||||
|
|
@ -341,7 +341,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - let closure = |#[deny(unused_parens)] param: (i32)| {};
|
||||
LL + let closure = |#[deny(unused_parens)] param: i32| {};
|
||||
|
|
||||
|
|
||||
|
||||
error: unnecessary parentheses around block return value
|
||||
--> $DIR/lint-attr-everywhere-early.rs:125:46
|
||||
|
|
@ -358,7 +358,7 @@ help: remove these parentheses
|
|||
|
|
||||
LL - let f = Match{#[deny(unused_parens)]f1: {(123)}};
|
||||
LL + let f = Match{#[deny(unused_parens)]f1: {123}};
|
||||
|
|
||||
|
|
||||
|
||||
error: usage of an `unsafe` block
|
||||
--> $DIR/lint-attr-everywhere-early.rs:132:13
|
||||
|
|
|
|||
|
|
@ -142,35 +142,6 @@ note: the lint level is defined here
|
|||
LL | #[deny(missing_docs)]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
|
||||
--> $DIR/lint-attr-everywhere-late.rs:93:38
|
||||
|
|
||||
LL | fn denied_from_inner(_x: Box<dyn Drop>) {}
|
||||
| ^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:91:13
|
||||
|
|
||||
LL | #![deny(dyn_drop)]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: the return value of `mem::discriminant` is unspecified when called with a non-enum type
|
||||
--> $DIR/lint-attr-everywhere-late.rs:96:21
|
||||
|
|
||||
LL | fn assoc_fn() { discriminant::<i32>(&123); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:95:12
|
||||
|
|
||||
LL | #[deny(enum_intrinsics_non_enums)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `i32`, which is not an enum.
|
||||
--> $DIR/lint-attr-everywhere-late.rs:96:41
|
||||
|
|
||||
LL | fn assoc_fn() { discriminant::<i32>(&123); }
|
||||
| ^^^^
|
||||
|
||||
error: missing documentation for a variant
|
||||
--> $DIR/lint-attr-everywhere-late.rs:112:5
|
||||
|
|
||||
|
|
@ -217,6 +188,60 @@ LL | #[deny(clashing_extern_declarations)]
|
|||
= note: expected `unsafe extern "C" fn()`
|
||||
found `unsafe extern "C" fn(i32)`
|
||||
|
||||
error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
|
||||
--> $DIR/lint-attr-everywhere-late.rs:93:38
|
||||
|
|
||||
LL | fn denied_from_inner(_x: Box<dyn Drop>) {}
|
||||
| ^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:91:13
|
||||
|
|
||||
LL | #![deny(dyn_drop)]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: the return value of `mem::discriminant` is unspecified when called with a non-enum type
|
||||
--> $DIR/lint-attr-everywhere-late.rs:96:21
|
||||
|
|
||||
LL | fn assoc_fn() { discriminant::<i32>(&123); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:95:12
|
||||
|
|
||||
LL | #[deny(enum_intrinsics_non_enums)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `i32`, which is not an enum.
|
||||
--> $DIR/lint-attr-everywhere-late.rs:96:41
|
||||
|
|
||||
LL | fn assoc_fn() { discriminant::<i32>(&123); }
|
||||
| ^^^^
|
||||
|
||||
error: literal out of range for `u8`
|
||||
--> $DIR/lint-attr-everywhere-late.rs:98:59
|
||||
|
|
||||
LL | #[deny(overflowing_literals)] const ASSOC_CONST: u8 = 1000;
|
||||
| ^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:98:12
|
||||
|
|
||||
LL | #[deny(overflowing_literals)] const ASSOC_CONST: u8 = 1000;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
= note: the literal `1000` does not fit into the type `u8` whose range is `0..=255`
|
||||
|
||||
error: variable `PARAM` should have a snake case name
|
||||
--> $DIR/lint-attr-everywhere-late.rs:131:37
|
||||
|
|
||||
LL | fn function(#[deny(non_snake_case)] PARAM: i32) {}
|
||||
| ^^^^^ help: convert the identifier to snake case: `param`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:131:20
|
||||
|
|
||||
LL | fn function(#[deny(non_snake_case)] PARAM: i32) {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: the return value of `mem::discriminant` is unspecified when called with a non-enum type
|
||||
--> $DIR/lint-attr-everywhere-late.rs:139:13
|
||||
|
|
||||
|
|
@ -234,6 +259,18 @@ note: the argument to `discriminant` should be a reference to an enum, but it wa
|
|||
LL | let _ = discriminant::<i32>(&123);
|
||||
| ^^^^
|
||||
|
||||
error: variable `PARAM` should have a snake case name
|
||||
--> $DIR/lint-attr-everywhere-late.rs:145:44
|
||||
|
|
||||
LL | let closure = |#[deny(non_snake_case)] PARAM: i32| {};
|
||||
| ^^^^^ help: convert the identifier to snake case: `param`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:145:27
|
||||
|
|
||||
LL | let closure = |#[deny(non_snake_case)] PARAM: i32| {};
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: the return value of `mem::discriminant` is unspecified when called with a non-enum type
|
||||
--> $DIR/lint-attr-everywhere-late.rs:155:13
|
||||
|
|
||||
|
|
@ -387,42 +424,5 @@ note: the argument to `discriminant` should be a reference to an enum, but it wa
|
|||
LL | TupleStruct(#[deny(enum_intrinsics_non_enums)] discriminant::<i32>(&123));
|
||||
| ^^^^
|
||||
|
||||
error: literal out of range for `u8`
|
||||
--> $DIR/lint-attr-everywhere-late.rs:98:59
|
||||
|
|
||||
LL | #[deny(overflowing_literals)] const ASSOC_CONST: u8 = 1000;
|
||||
| ^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:98:12
|
||||
|
|
||||
LL | #[deny(overflowing_literals)] const ASSOC_CONST: u8 = 1000;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
= note: the literal `1000` does not fit into the type `u8` whose range is `0..=255`
|
||||
|
||||
error: variable `PARAM` should have a snake case name
|
||||
--> $DIR/lint-attr-everywhere-late.rs:131:37
|
||||
|
|
||||
LL | fn function(#[deny(non_snake_case)] PARAM: i32) {}
|
||||
| ^^^^^ help: convert the identifier to snake case: `param`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:131:20
|
||||
|
|
||||
LL | fn function(#[deny(non_snake_case)] PARAM: i32) {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: variable `PARAM` should have a snake case name
|
||||
--> $DIR/lint-attr-everywhere-late.rs:145:44
|
||||
|
|
||||
LL | let closure = |#[deny(non_snake_case)] PARAM: i32| {};
|
||||
| ^^^^^ help: convert the identifier to snake case: `param`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/lint-attr-everywhere-late.rs:145:27
|
||||
|
|
||||
LL | let closure = |#[deny(non_snake_case)] PARAM: i32| {};
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 31 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue