Improve error message for non-copy struct fields

Make sure the error message points to the type in question instead of to
the `#[wasm_bindgen]` macro which can be overly confusing!
This commit is contained in:
Alex Crichton
2019-04-08 07:35:14 -07:00
parent 16745edf3f
commit e4400ac8b4
3 changed files with 60 additions and 4 deletions

View File

@ -0,0 +1,10 @@
#![crate_type = "rlib"]
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub struct A {
pub field: String,
}