auto merge of #16598 : bkoropoff/rust/import-shadow-name, r=alexcrichton

This partially alleviates the confusing behavior in issue #16597
This commit is contained in:
bors 2014-08-30 12:41:22 +00:00
commit cbacdbc5f3
4 changed files with 32 additions and 11 deletions

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::slice as std; //~ ERROR import conflicts with imported crate
use std::slice as std; //~ ERROR import `std` conflicts with imported crate
fn main() {
}

View file

@ -9,7 +9,7 @@
// except according to those terms.
use std::mem::transmute;
//~^ ERROR import conflicts with value in this module
//~^ ERROR import `transmute` conflicts with value in this module
fn transmute() {}

View file

@ -0,0 +1,18 @@
// 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.
use std::slice::Items;
//~^ ERROR import `Items` conflicts with type in this module
struct Items;
fn main() {
}