mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-15 17:50:51 +00:00
Add a test that fails to compile if generated code triggers unused lint warning. (#2145)
* Add a test that fails to compile if generated code triggers unused lint warning. * Fix formatting.
This commit is contained in:
parent
047b4209ad
commit
1e1cab6202
10
tests/must_use.rs
Normal file
10
tests/must_use.rs
Normal file
@ -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 {}
|
Loading…
x
Reference in New Issue
Block a user