-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alpha' into format_tools_experiment_1
- Loading branch information
Showing
125 changed files
with
1,681 additions
and
82 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use std::fmt::Debug; | ||
use core::ops::Not; | ||
use super::*; | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
struct BoundsInlined< T : ToString + Not< Output = T >, U : Debug + Not< Output = U > > | ||
{ | ||
a : T, | ||
b : U, | ||
} | ||
|
||
include!( "./only_test/bounds_inlined.rs" ); |
21 changes: 21 additions & 0 deletions
21
module/core/derive_tools/tests/inc/not/bounds_inlined_manual.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,21 @@ | ||
use std::fmt::Debug; | ||
use core::ops::Not; | ||
|
||
#[ allow( dead_code ) ] | ||
struct BoundsInlined< T : ToString + Not< Output = T >, U : Debug + Not< Output = U > > | ||
{ | ||
a: T, | ||
b: U, | ||
} | ||
|
||
impl< T : ToString + Not< Output = T >, U : Debug + Not< Output = U > > Not for BoundsInlined< T, U > | ||
{ | ||
type Output = Self; | ||
|
||
fn not( self ) -> Self::Output | ||
{ | ||
Self { a : !self.a, b : !self.b } | ||
} | ||
} | ||
|
||
include!( "./only_test/bounds_inlined.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,15 @@ | ||
use std::fmt::Debug; | ||
use core::ops::Not; | ||
use super::*; | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
struct BoundsMixed< T : ToString + Not< Output = T >, U > | ||
where | ||
U : Debug + Not< Output = U >, | ||
{ | ||
a: T, | ||
b: U, | ||
} | ||
|
||
include!( "./only_test/bounds_mixed.rs" ); |
25 changes: 25 additions & 0 deletions
25
module/core/derive_tools/tests/inc/not/bounds_mixed_manual.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,25 @@ | ||
use std::fmt::Debug; | ||
use core::ops::Not; | ||
|
||
#[ allow( dead_code ) ] | ||
struct BoundsMixed< T : ToString + Not< Output = T >, U > | ||
where | ||
U : Debug + Not< Output = U >, | ||
{ | ||
a : T, | ||
b : U, | ||
} | ||
|
||
impl< T : ToString + Not< Output = T >, U > Not for BoundsMixed< T, U > | ||
where | ||
U : Debug + Not< Output = U >, | ||
{ | ||
type Output = Self; | ||
|
||
fn not( self ) -> Self::Output | ||
{ | ||
Self { a : !self.a, b : !self.b } | ||
} | ||
} | ||
|
||
include!( "./only_test/bounds_mixed.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,16 @@ | ||
use std::fmt::Debug; | ||
use core::ops::Not; | ||
use super::*; | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
struct BoundsWhere< T, U > | ||
where | ||
T : ToString + Not< Output = T >, | ||
U : Debug + Not< Output = U >, | ||
{ | ||
a : T, | ||
b : U, | ||
} | ||
|
||
include!( "./only_test/bounds_where.rs" ); |
27 changes: 27 additions & 0 deletions
27
module/core/derive_tools/tests/inc/not/bounds_where_manual.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,27 @@ | ||
use std::fmt::Debug; | ||
use core::ops::Not; | ||
|
||
#[ allow( dead_code ) ] | ||
struct BoundsWhere< T, U > | ||
where | ||
T: ToString + Not< Output = T >, | ||
U: Debug + Not< Output = U >, | ||
{ | ||
a : T, | ||
b : U, | ||
} | ||
|
||
impl< T, U > Not for BoundsWhere< T, U > | ||
where | ||
T : ToString + Not< Output = T >, | ||
U : Debug + Not< Output = U >, | ||
{ | ||
type Output = Self; | ||
|
||
fn not( self ) -> Self::Output | ||
{ | ||
Self { a : !self.a, b : !self.b } | ||
} | ||
} | ||
|
||
include!( "./only_test/bounds_where.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,14 @@ | ||
use super::*; | ||
|
||
pub mod core {} | ||
pub mod std {} | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
struct NameCollisions | ||
{ | ||
a : bool, | ||
b : u8, | ||
} | ||
|
||
include!( "./only_test/name_collisions.rs" ); |
12 changes: 12 additions & 0 deletions
12
module/core/derive_tools/tests/inc/not/named_default_off.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,12 @@ | ||
use super::*; | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
#[ not( off ) ] | ||
struct NamedDefaultOff | ||
{ | ||
a : bool, | ||
b : u8, | ||
} | ||
|
||
include!( "only_test/named_default_off.rs" ); |
20 changes: 20 additions & 0 deletions
20
module/core/derive_tools/tests/inc/not/named_default_off_manual.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,20 @@ | ||
use core::ops::Not; | ||
|
||
#[ allow( dead_code ) ] | ||
struct NamedDefaultOff | ||
{ | ||
a : bool, | ||
b : u8, | ||
} | ||
|
||
impl Not for NamedDefaultOff | ||
{ | ||
type Output = Self; | ||
|
||
fn not( self ) -> Self::Output | ||
{ | ||
Self { a : self.a, b : self.b } | ||
} | ||
} | ||
|
||
include!( "only_test/named_default_off.rs" ); |
13 changes: 13 additions & 0 deletions
13
module/core/derive_tools/tests/inc/not/named_default_off_reference_on.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 @@ | ||
use super::*; | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
#[ not( off ) ] | ||
struct NamedDefaultOffReferenceOn< 'a > | ||
{ | ||
#[ not( on ) ] | ||
a : &'a bool, | ||
b : u8, | ||
} | ||
|
||
include!( "only_test/named_default_off_reference_on.rs" ); |
20 changes: 20 additions & 0 deletions
20
module/core/derive_tools/tests/inc/not/named_default_off_reference_on_manual.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,20 @@ | ||
use core::ops::Not; | ||
|
||
#[ allow( dead_code ) ] | ||
struct NamedDefaultOffReferenceOn< 'a > | ||
{ | ||
a : &'a bool, | ||
b : u8, | ||
} | ||
|
||
impl< 'a > Not for NamedDefaultOffReferenceOn< 'a > | ||
{ | ||
type Output = Self; | ||
|
||
fn not(self) -> Self::Output | ||
{ | ||
Self { a: self.a, b : self.b } | ||
} | ||
} | ||
|
||
include!( "only_test/named_default_off_reference_on.rs" ); |
13 changes: 13 additions & 0 deletions
13
module/core/derive_tools/tests/inc/not/named_default_off_some_on.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 @@ | ||
use super::*; | ||
|
||
#[ allow( dead_code ) ] | ||
#[ derive( the_module::Not ) ] | ||
#[ not( off )] | ||
struct NamedDefaultOffSomeOn | ||
{ | ||
a : bool, | ||
#[ not( on ) ] | ||
b : u8, | ||
} | ||
|
||
include!( "only_test/named_default_off_some_on.rs" ); |
20 changes: 20 additions & 0 deletions
20
module/core/derive_tools/tests/inc/not/named_default_off_some_on_manual.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,20 @@ | ||
use core::ops::Not; | ||
|
||
#[ allow( dead_code ) ] | ||
struct NamedDefaultOffSomeOn | ||
{ | ||
a : bool, | ||
b : u8, | ||
} | ||
|
||
impl Not for NamedDefaultOffSomeOn | ||
{ | ||
type Output = Self; | ||
|
||
fn not( self ) -> Self::Output | ||
{ | ||
Self { a: self.a, b: !self.b } | ||
} | ||
} | ||
|
||
include!( "only_test/named_default_off_some_on.rs" ); |
Oops, something went wrong.