mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Merge pull request #1657 from fitzgen/fix-dyn-warnings
Fix warnings about missing `dyn` on trait objects
This commit is contained in:
commit
5c975592be
@ -54,8 +54,8 @@ pub mod strings;
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn closures_work() {
|
||||
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
|
||||
let x = Closure::wrap(Box::new(|| {}) as Box<dyn FnMut()>);
|
||||
drop(x);
|
||||
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
|
||||
let x = Closure::wrap(Box::new(|| {}) as Box<dyn FnMut()>);
|
||||
x.forget();
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use wasm_bindgen_test::*;
|
||||
|
||||
#[wasm_bindgen(module = "/tests/headless/strings.js")]
|
||||
extern "C" {
|
||||
fn test_string_roundtrip(c: &Closure<Fn(String) -> String>);
|
||||
fn test_string_roundtrip(c: &Closure<dyn Fn(String) -> String>);
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
|
Loading…
x
Reference in New Issue
Block a user