File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -141,15 +141,9 @@ fn main() {
141
141
}
142
142
```
143
143
144
- Because this procedural macro is only loaded when it is used as the
145
- test framework, the ` #[mytest] ` annotation should probably be kept
146
- behind ` #[cfg(mytest)] ` (which is automatically set when we are currently running
147
- with the ` mytest ` framework, i.e. ` cargo test --framework mytest ` is being run)
148
- so that you don't get unknown attribute warnings
149
- whilst loading, and to avoid conflicts with other frameworks
150
- that may use the same attributes. (We could change this by asking
151
- attributes to be registered in Cargo.toml, but we don't find this
152
- necessary)
144
+ The compiler will make marked items ` pub(crate) ` (i.e. by making
145
+ all their parent modules public). ` #[test] ` and ` #[bench] ` items will only exist
146
+ with ` --cfg test ` (or bench), which is automatically set when running tests.
153
147
154
148
155
149
A crate may only define a single framework.
You can’t perform that action at this time.
0 commit comments