mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
Improve diagnostics with missing trait implementations
Rejigger a few spans, work around an odd rustc issue, and hopefully produce higher quality error messages! Closes #1528
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
error[E0277]: the trait bound `std::result::Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>: wasm_bindgen::convert::traits::FromWasmAbi` is not satisfied
|
||||
--> $DIR/missing-catch.rs:3:1
|
||||
--> $DIR/missing-catch.rs:6:9
|
||||
|
|
||||
3 | #[wasm_bindgen]
|
||||
| ^^^^^^^^^^^^^^^ the trait `wasm_bindgen::convert::traits::FromWasmAbi` is not implemented for `std::result::Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
|
||||
6 | pub fn foo() -> Result<JsValue, JsValue>;
|
||||
| ^^^ the trait `wasm_bindgen::convert::traits::FromWasmAbi` is not implemented for `std::result::Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
Reference in New Issue
Block a user