-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Description
I was not sure if this is a bug in the Rust compiler, because I am doing something that was not supposed to work, but the Rust compiler says it is a bug (and asked to report it). What I did:
git clone https://github.com/swc-project/swc.git swc
rm swc/Cargo.toml // removed parent cargo.toml because I want to compile only a sub-package
cd swc/ecmascript/parser
cargo build --target wasm32-unknown-unknown --release // SWC project was not supposed to be compiled for WASM target.
Compiling [...many packages...]
Compiling swc_common v0.4.0 (C:\w\swc-master\common)
Compiling swc_ecma_ast v0.10.0 (C:\w\swc-master\ecmascript\ast)
Compiling swc_ecma_parser v0.12.0 (C:\w\swc-master\ecmascript\parser)
thread 'rustc' panicked at 'src\librustc_resolve\resolve_imports.rs:880: inconsistent resolution for an import', src\librustnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: rustc 1.41.0-nightly (412f43ac5 2019-11-24) running on x86_64-pc-windows-msvc
The problem only occurs when passing --target wasm32-unknown-unknown
flag. Simple cargo build --release
works fine.
Metadata
Metadata
Assignees
Labels
No labels