Skip to content

Commit

Permalink
Add a test that fails to compile if generated code triggers unused li…
Browse files Browse the repository at this point in the history
…nt warning. (#2145)

* Add a test that fails to compile if generated code triggers unused lint warning.

* Fix formatting.
  • Loading branch information
TannerRogalsky committed May 19, 2020
1 parent 047b420 commit 1e1cab6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/must_use.rs
@@ -0,0 +1,10 @@
//! This test validates that the generated bindings don't cause linting warnings
//! when used with structs annotated with `#[must_use]`.

#![deny(unused)]

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
#[must_use]
pub struct MustUse {}

0 comments on commit 1e1cab6

Please sign in to comment.