Skip to content

Commit

Permalink
ref: removed incorrect fixes, fix: tests and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkvisto committed Jul 17, 2024
1 parent bdb3797 commit 4f0555c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module/core/macro_tools/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ The purpose of `typ::type_parameters` is to extract type parameters from a given
In this example, we generate a type `core::option::Option<i8, i16, i32, i64>` and extract its type parameters.

```rust
#[ cfg( not( feature = "enabled" ) ) ]
#[ cfg( not( all( feature = "enabled", feature = "typ" ) ) ) ]
fn main(){}
#[ cfg( feature = "enabled" ) ]
#[ cfg( all( feature = "enabled", feature = "typ" ) ) ]
fn main()
{
// Import necessary macros and modules from the `macro_tools` crate.
Expand Down Expand Up @@ -80,9 +80,9 @@ defined in other crates.

```rust

#[ cfg( not( all( feature = "enabled", debug_assertions ) ) ) ]
#[ cfg( not( all( feature = "enabled", feature = "attr_prop", debug_assertions ) ) ) ]
fn main(){}
#[ cfg( all( feature = "enabled", debug_assertions ) ) ]
#[ cfg( all( feature = "enabled", feature = "attr_prop", debug_assertions ) ) ]
fn main()
{

Expand Down
16 changes: 16 additions & 0 deletions module/core/macro_tools/tests/inc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,39 @@ mod if_enabled

use super::*;

#[ cfg( feature = "attr" ) ]
mod attr_test;
#[ cfg( feature = "attr_prop" ) ]
mod attr_prop_test;
mod basic_test;
#[ cfg( feature = "ct" ) ]
mod compile_time_test;
#[ cfg( feature = "container_kind" ) ]
mod container_kind_test;
#[ cfg( feature = "derive" ) ]
mod derive_test;
#[ cfg( feature = "diag" ) ]
mod diag_test;
mod drop_test;
#[ cfg( feature = "equation" ) ]
mod equation_test;
#[ cfg( feature = "generic_args" ) ]
mod generic_args_test;
#[ cfg( feature = "generic_params" ) ]
mod generic_params_test;
#[ cfg( feature = "item" ) ]
mod item_test;
#[ cfg( feature = "item_struct" ) ]
mod item_struct_test;
#[ cfg( feature = "phantom" ) ]
mod phantom_test;
#[ cfg( feature = "quantifier" ) ]
mod quantifier_test;
#[ cfg( feature = "struct_like" ) ]
mod struct_like_test;
#[ cfg( feature = "tokens" ) ]
mod tokens_test;
#[ cfg( feature = "typ" ) ]
mod typ_test;

}

0 comments on commit 4f0555c

Please sign in to comment.