-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #627 from james-jra/syn-2
Update pnet_macros to use syn v2
- Loading branch information
Showing
6 changed files
with
119 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 40 additions & 4 deletions
44
pnet_macros/tests/compile-fail/construct-with-errors.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
error: #[construct_with] must have at least one argument | ||
--> $DIR/construct-with-errors.rs:20:7 | ||
--> tests/compile-fail/construct-with-errors.rs:20:7 | ||
| | ||
20 | #[construct_with()] //~ ERROR #[construct_with] must have at least one argument | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: #[construct_with] should be of the form #[construct_with(<types>)] | ||
--> $DIR/construct-with-errors.rs:28:22 | ||
error: unexpected literal in nested attribute, expected ident | ||
--> tests/compile-fail/construct-with-errors.rs:28:22 | ||
| | ||
28 | #[construct_with("test")] //~ ERROR #[construct_with] should be of the form #[construct_with(<types>)] | ||
28 | #[construct_with("test")] //~ ERROR #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
| ^^^^^^ | ||
|
||
error: #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
--> tests/compile-fail/construct-with-errors.rs:28:7 | ||
| | ||
28 | #[construct_with("test")] //~ ERROR #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: expected ident | ||
--> tests/compile-fail/construct-with-errors.rs:36:24 | ||
| | ||
36 | #[construct_with(::foo:bar)] //~ ERROR #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
| ^^^ | ||
|
||
error: #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
--> tests/compile-fail/construct-with-errors.rs:36:7 | ||
| | ||
36 | #[construct_with(::foo:bar)] //~ ERROR #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: expected `,` | ||
--> tests/compile-fail/construct-with-errors.rs:44:25 | ||
| | ||
44 | #[construct_with(Vec<u8>)] //~ ERROR #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
| ^ | ||
|
||
error: #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
--> tests/compile-fail/construct-with-errors.rs:44:7 | ||
| | ||
44 | #[construct_with(Vec<u8>)] //~ ERROR #[construct_with] should be of the form #[construct_with(<primitive types>)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: arguments to #[construct_with] must be primitives | ||
--> tests/compile-fail/construct-with-errors.rs:52:5 | ||
| | ||
52 | #[construct_with(test)] //~ ERROR arguments to #[construct_with] must be primitives | ||
| ^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: variable length field must have #[length = ""] or #[length_fn = ""] attribute | ||
--> $DIR/variable_length_fields.rs:16:17 | ||
--> tests/compile-fail/variable_length_fields.rs:16:17 | ||
| | ||
16 | var_length: Vec<u8>, //~ ERROR: variable length field must have #[length = ""] or #[length_fn = ""] attribute | ||
| ^^^ |