Merge pull request #1657 from fitzgen/fix-dyn-warnings

Fix warnings about missing `dyn` on trait objects
This commit is contained in:
Alex Crichton 2019-07-11 17:11:07 -05:00 committed by GitHub
commit 5c975592be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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();
}

View File

@ -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]