File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,3 +3,9 @@ fn event_invalid_signatures() {
33 let t = trybuild:: TestCases :: new ( ) ;
44 t. compile_fail ( "tests/ui/*.rs" ) ;
55}
6+
7+ #[ test]
8+ fn event_valid_signatures ( ) {
9+ let t = trybuild:: TestCases :: new ( ) ;
10+ t. pass ( "tests/pass/*.rs" ) ;
11+ }
Original file line number Diff line number Diff line change 1+ // Regression test for https://github.com/cloudflare/workers-rs/issues/973.
2+ // A `#[event(start)]` handler must compile without `wasm-bindgen` as a direct
3+ // dependency. The macro should resolve `wasm_bindgen` through `::worker::`.
4+ // It must also not conflict when `wasm_bindgen` is already in scope, or when
5+ // multiple `#[event(start)]` handlers exist in the same module.
6+ use worker:: { event, wasm_bindgen} ;
7+
8+ #[ event( start) ]
9+ pub fn setup_hook ( ) { }
10+
11+ #[ event( start) ]
12+ pub fn another_hook ( ) { }
13+
14+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments