Skip to content

Code generated by wasm_bindgen_test doesn't pass Clippy #1540

Closed
@RReverser

Description

@RReverser

Describe the Bug

#[wasm_bindgen_test] generates code that fails default Clippy checks.

Steps to Reproduce

Add any WASM test, e.g.:

#[wasm_bindgen_test]
fn some_test() {}

Run Clippy for all targets (this is not unusual):

$ cargo clippy --all-targets

Expected Behavior

Only Clippy violations in user-defined code are reported.

Actual Behavior

Clippy shows:

error: this public function dereferences a raw pointer but is not marked `unsafe`
   --> tests\test.rs:271:1
    |
271 | #[wasm_bindgen_test]
    | ^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref

for every #[wasm_bindgen_test].

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe could use some help fixing this issue!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions