Skip to content

strict-macro checking should be enabled by default #3038

@lukaslihotzki

Description

@lukaslihotzki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions