rustc: Fix shadowing private import with reexport
The reexport didn't switch the privacy, so the reexport was actually considered private, erroneously failing to resolve imports later on. Closes #14082
This commit is contained in:
parent
6a2b3d1471
commit
9a5bbd773c
2 changed files with 33 additions and 1 deletions
29
src/test/run-pass/issue-14082.rs
Normal file
29
src/test/run-pass/issue-14082.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
#![feature(globs)]
|
||||
#![allow(unused_imports, dead_code)]
|
||||
|
||||
use foo::GC;
|
||||
|
||||
mod foo {
|
||||
use d::*;
|
||||
pub use m::GC; // this should shadow d::GC
|
||||
}
|
||||
|
||||
mod m {
|
||||
pub struct GC;
|
||||
}
|
||||
|
||||
mod d {
|
||||
pub struct GC;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue