-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
derive_tools : Index macros
- Loading branch information
Showing
13 changed files
with
418 additions
and
83 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
4 changes: 2 additions & 2 deletions
4
module/core/derive_tools/tests/inc/index/compiletime/struct.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,8 +1,8 @@ | ||
error: Only one field can include #[index] derive macro | ||
error: Only one field can include #[ index ] derive macro | ||
--> tests/inc/index/compiletime/struct.rs:6:3 | ||
| | ||
6 | / #[ index ] | ||
7 | | a: Vec< T >, | ||
7 | | a : Vec< T >, | ||
8 | | #[ index ] | ||
9 | | b : Vec< T >, | ||
| |_______________^ |
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
23 changes: 23 additions & 0 deletions
23
module/core/derive_tools/tests/inc/index/struct_collisions.rs
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#![ allow( non_snake_case ) ] | ||
#![ allow( unused_imports ) ] | ||
use super::*; | ||
|
||
pub mod core {} | ||
pub mod std {} | ||
pub mod marker {} | ||
|
||
pub mod a {} | ||
pub mod b {} | ||
|
||
#[ derive( the_module::Index, the_module::From ) ] | ||
#[ allow( dead_code ) ] | ||
struct StructMultipleNamed< T > | ||
{ | ||
#[ from ( on ) ] | ||
a : Vec< T >, | ||
#[ index ] | ||
b : Vec< T >, | ||
} | ||
|
||
include!( "./only_test/struct_multiple_named.rs" ); | ||
|
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ struct StructMultipleNamed< T > | |
} | ||
|
||
include!( "./only_test/struct_multiple_named.rs" ); | ||
|
13 changes: 13 additions & 0 deletions
13
module/core/derive_tools/tests/inc/index/struct_multiple_named_item.rs
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#![ allow( dead_code ) ] | ||
#[ allow( unused_imports ) ] | ||
use super::*; | ||
|
||
#[ derive( the_module::Index ) ] | ||
#[ index ( name = b ) ] | ||
struct StructMultipleNamed< T > | ||
{ | ||
a : Vec< T >, | ||
b : Vec< T >, | ||
} | ||
|
||
include!( "./only_test/struct_multiple_named.rs" ); |
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
Oops, something went wrong.