-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Describe the Bug
Unapplicable attributes are accepted inside wasm_bindgen impl
and extern
blocks.
Steps to Reproduce
#[wasm_bindgen]
pub struct Foo;
#[wasm_bindgen]
impl Foo {
#[wasm_bindgen(inline_js = "hello world", raw_module = "something.js")]
pub fn foo() {
}
}
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(inline_js = "hello world", raw_module = "something.js")]
pub fn bar();
}
Expected Behavior
Compile errors in Foo::foo
and bar
because the attributes inline_js
and raw_module
are not applicable for these items.
Actual Behavior
These attributes are silently ignored.