Resolve prefix in imports with empty braces
This commit is contained in:
parent
357982fae4
commit
c3f53d1b12
6 changed files with 74 additions and 10 deletions
15
src/test/compile-fail/issue-28388-1.rs
Normal file
15
src/test/compile-fail/issue-28388-1.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Prefix in imports with empty braces should be resolved and checked privacy, stability, etc.
|
||||
|
||||
use foo::{}; //~ ERROR failed to resolve. foo
|
||||
|
||||
fn main() {}
|
||||
19
src/test/compile-fail/issue-28388-2.rs
Normal file
19
src/test/compile-fail/issue-28388-2.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Prefix in imports with empty braces should be resolved and checked privacy, stability, etc.
|
||||
|
||||
mod m {
|
||||
mod n {}
|
||||
}
|
||||
|
||||
use m::n::{}; //~ ERROR module `n` is private
|
||||
|
||||
fn main() {}
|
||||
16
src/test/compile-fail/issue-28388-3.rs
Normal file
16
src/test/compile-fail/issue-28388-3.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Prefix in imports with empty braces should be resolved and checked privacy, stability, etc.
|
||||
|
||||
use std::rt::{}; //~ ERROR use of unstable library feature 'rt'
|
||||
use std::{}; // OK
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue