Support #[wasm_bindgen(setter, js_name = ...)]

Previously we'd require the explicit `js_name` to *also* start with
`set_`, but when explicitly specified it shouldn't be mangled at all!

Closes #584
This commit is contained in:
Alex Crichton
2018-09-21 17:34:41 -07:00
parent 534cceafc8
commit 75f005be23
5 changed files with 20 additions and 8 deletions

View File

@ -4,11 +4,5 @@ error: setters must start with `set_`, found: a
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
error: aborting due to previous error