We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 416a071 commit 2ad3778Copy full SHA for 2ad3778
text/0000-erfc-post-build-contexts.md
@@ -77,18 +77,23 @@ called `mytest`:
77
78
```rust
79
extern crate proc_macro;
80
-use proc_macro::TokenStream;
+use proc_macro::{TestFrameworkContext, TokenStream};
81
82
// attributes() is optional
83
#[test_framework(attributes(foo, bar))]
84
-pub fn mytest(items: &[AnnotatedItem]) -> TokenStream {
+pub fn mytest(context: &TestFrameworkContext) -> TokenStream {
85
// ...
86
}
87
```
88
89
where
90
91
92
+struct TestFrameworkContext<'a> {
93
+ items: &'a [AnnotatedItem],
94
+ // ... (may be added in the future)
95
+}
96
+
97
struct AnnotatedItem
98
tokens: TokenStream,
99
span: Span,
0 commit comments