You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue a better error message if the target is unsupported. (#110)
Following an idea from in #76, add a sys.rs file, which only gets used
if the target isn't recognized, and use `compile_error` to give a
meaningful error message instead of cryptically failing on the compiler
being unable to open sys.rs.
For example, using --target=wasm32-unknown-unknown now gets this error:
```console
$ cargo check --target=wasm32-unknown-unknown
Checking errno v0.3.11
error: The target OS is "unknown" or "none", so it's unsupported by the errno crate.
--> src/sys.rs:8:1
|
8 | compile_error!("The target OS is \"unknown\" or \"none\", so it's unsupported by the errno crate.");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not compile `errno` (lib) due to 1 previous error
```
0 commit comments