mirror of https://github.com/rust-lang/rust.git
34 lines
751 B
Rust
34 lines
751 B
Rust
//@ compile-flags: -Zdeduplicate-diagnostics=yes
|
|
|
|
#![feature( no_core)]
|
|
#![no_core] // makes debugging this test *a lot* easier (during resolve)
|
|
|
|
// Test to make sure that private items imported through globs remain private
|
|
// when they're used.
|
|
|
|
mod bar {
|
|
pub use self::glob::*;
|
|
|
|
mod glob {
|
|
fn gpriv() {}
|
|
//~^ ERROR requires `sized` lang_item
|
|
}
|
|
}
|
|
|
|
pub fn foo() {}
|
|
//~^ ERROR requires `sized` lang_item
|
|
|
|
fn test1() {
|
|
//~^ ERROR requires `sized` lang_item
|
|
use bar::gpriv;
|
|
//~^ ERROR unresolved import `bar::gpriv` [E0432]
|
|
//~| no `gpriv` in `bar`
|
|
|
|
// This should pass because the compiler will insert a fake name binding
|
|
// for `gpriv`
|
|
gpriv();
|
|
}
|
|
|
|
fn main() {}
|
|
//~^ ERROR requires `sized` lang_item
|