Skip to content

rustc (nightly) hangs when put extern crate + use inside a function  #36881

Closed
@andelf

Description

@andelf

When use both extern crate and use on same crate inside a function, the nightly rust compiler hangs forever.

I tried this code (A fresh cargo new):

pub fn foo() {
    extern crate rand; // `rand` is configured in Cargo.toml, or any other crate.
    use rand::Rng; // or anything starts with ``rand::``

    // code here
}

I expected it works.

Instead, the compiler hangs and doesn't out put anything.

Meta

rustc --version --verbose:

rustc 1.14.0-nightly (289f3a4ca 2016-09-29)
binary: rustc
commit-hash: 289f3a4ca79916d6445b452fc19a18a1e42a879a
commit-date: 2016-09-29
host: x86_64-apple-darwin
release: 1.14.0-nightly

No Backtrace. Stable toolchain is OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions