wasm-bindgen/tests/must_use.rs
Tanner Rogalsky 1e1cab6202
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.
2020-05-19 09:43:44 -05:00

11 lines
238 B
Rust

//! 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 {}