-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
87 additions
and
77 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
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
14 changes: 7 additions & 7 deletions
14
packages/iocraft-macros/tests/covariant.rs → packages/iocraft-macros/tests/props.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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
#![allow(dead_code)] | ||
|
||
use iocraft_macros::Covariant; | ||
use iocraft_macros::Props; | ||
|
||
#[derive(Covariant)] | ||
#[derive(Props)] | ||
struct Unit; | ||
|
||
#[derive(Covariant)] | ||
#[derive(Props)] | ||
struct BasicStruct { | ||
foo: i32, | ||
} | ||
|
||
#[derive(Covariant)] | ||
#[derive(Props)] | ||
struct StructWithLifetime<'lt> { | ||
foo: &'lt i32, | ||
bar: &'lt mut i32, | ||
} | ||
|
||
#[derive(Covariant)] | ||
#[derive(Props)] | ||
struct StructWithLifetimeAndConsts<'lt, const N: usize, const M: usize> { | ||
foo: &'lt i32, | ||
bar: &'lt mut i32, | ||
baz: [i32; N], | ||
qux: [i32; M], | ||
} | ||
|
||
#[derive(Covariant)] | ||
#[derive(Props)] | ||
struct StructWithTypeGeneric<T> { | ||
foo: T, | ||
} | ||
|
||
#[derive(Covariant)] | ||
#[derive(Props)] | ||
struct StructWithLifetimeAndTypeGeneric<'lt, T> { | ||
foo: &'lt 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
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
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