mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-16 05:59:21 +03:00
534cceafc8
If the setter doesn't start with `set_*` then we currently panic, but panicking is bad! Instead let's thread through structured errors to make sure they make their way to the top
15 lines
372 B
Plaintext
15 lines
372 B
Plaintext
error: setters must start with `set_`, found: a
|
|
--> $DIR/invalid-setter.rs:10:8
|
|
|
|
|
10 | fn a(this: &A, b: i32);
|
|
| ^
|
|
|
|
error: setters must start with `set_`, found: x
|
|
--> $DIR/invalid-setter.rs:15:46
|
|
|
|
|
15 | #[wasm_bindgen(setter, method, js_name = x)]
|
|
| ^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|