Debian Codegraph @

.cargo/vendor/wasm-bindgen-macro/ui-tests/invalid-methods.rs

raw
1 use wasm_bindgen::prelude::*;
2
3 #[wasm_bindgen]
4 pub struct A;
5
6 #[wasm_bindgen]
7 default impl A {
8 }
9
10 #[wasm_bindgen]
11 unsafe impl A {
12 }
13
14 #[wasm_bindgen]
15 impl Clone for A {
16 }
17
18 #[wasm_bindgen]
19 impl<T> A {
20 }
21
22 #[wasm_bindgen]
23 impl &'static A {
24 }
25
26 macro_rules! x { () => () }
27
28 #[wasm_bindgen]
29 impl A {
30 const X: u32 = 3;
31 type Y = u32;
32 x!();
33
34 // pub default fn foo() {} // TODO: compiler's pretty printer totally broken
35 }
36
37 #[wasm_bindgen]
38 impl A {
39 pub const fn foo() {}
40 }
41
42 fn main() {}