Closed
Description
rustc
appears to hang when there is a malformed trait declaration in a submodule. Specifically, I am able to reliably induce the hang with the following setup:
- Create a new project with
cargo new --bin bugtest
mkdir src/ui
- Put the following code in
src/ui/mod.rs
pub trait Widget {
pub fn draw(&self)
}
cargo build
will appear to hang. I'm not sure if it's an infinite loop, or just really really slow.
Note the lack of a semicolon after the function declaration. While this is indeed malformed rust code, I would not expect the compiler to be extraordinarily slow to parse this code.
Meta
rustc --version --verbose:
rustc 1.9.0-nightly (7b0b80ae2 2016-03-02)
binary: rustc
commit-hash: 7b0b80ae21a195a5dba91d557f94a96136c27eaf
commit-date: 2016-03-02
host: x86_64-unknown-linux-gnu
release: 1.9.0-nightly