Debian Codegraph @

.cargo/vendor/wasm-bindgen-macro/ui-tests/unused-attributes.rs

raw
1 #![deny(unused_variables)]
2
3 use wasm_bindgen::prelude::*;
4
5 struct A {}
6
7 #[wasm_bindgen]
8 impl A {
9 #[wasm_bindgen(method)]
10 pub fn foo() {}
11 }
12
13 #[wasm_bindgen]
14 pub struct MyStruct {
15 hello: String,
16 }
17
18 #[wasm_bindgen(getter, typescript_custom_section)]
19 pub const FOO: &'static str = "FOO";
20
21 #[wasm_bindgen(readonly)]
22 pub fn bar() {}
23
24 #[wasm_bindgen(getter_with_clone, final)]
25 impl MyStruct {
26 #[wasm_bindgen(getter, typescript_type = "Thing[]")]
27 pub fn hello(&self) -> String {
28 self.hello.clone()
29 }
30 }
31
32 fn main() {}