Skip to content

use std::*; makes fail! fail #7580

Closed
Closed
@chris-morgan

Description

@chris-morgan

Minimal test case:

use std::*;
fn main() {
    fail!("");
}

rustc output:

<core-macros>:45:12: 45:48 error: unresolved import: could not find `sys` in `std::std`.
<core-macros>:45             ::std::sys::FailWithCause::fail_with($msg, file!(), line!())
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<core-macros>:40:4: 50:5 note: in expansion of fail!
x.rs:3:1: 3:11 note: expansion site
<core-macros>:45:12: 45:48 error: use of undeclared module `::std::sys::FailWithCause`
<core-macros>:45             ::std::sys::FailWithCause::fail_with($msg, file!(), line!())
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<core-macros>:40:4: 50:5 note: in expansion of fail!
x.rs:3:1: 3:11 note: expansion site
<core-macros>:45:12: 45:48 error: unresolved name `std::sys::FailWithCause::fail_with`.
<core-macros>:45             ::std::sys::FailWithCause::fail_with($msg, file!(), line!())
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<core-macros>:40:4: 50:5 note: in expansion of fail!
x.rs:3:1: 3:11 note: expansion site
error: aborting due to 3 previous errors

Rust 0.7, Ubuntu 13.04, 64-bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions