Rollup merge of #38171 - jseyfried:cleanup, r=nrc

Miscellaneous cleanup/refactoring in `resolve` and `syntax::ext`

r? @nrc
This commit is contained in:
Alex Crichton 2016-12-20 11:16:23 -08:00 committed by GitHub
commit 551cb0646f
38 changed files with 508 additions and 738 deletions

View file

@ -15,6 +15,6 @@ extern crate collections;
extern crate libc as collections;
//~^ ERROR E0259
//~| NOTE `collections` was already imported
//~| NOTE `collections` already imported
fn main() {}

View file

@ -12,6 +12,6 @@ mod foo { pub mod foo { } } //~ NOTE previous definition of `foo` here
use foo::foo;
//~^ ERROR a module named `foo` has already been defined in this module
//~| was already imported
//~| `foo` already defined
fn main() {}

View file

@ -11,13 +11,13 @@
use self::A; //~ NOTE previous import of `A` here
use self::B; //~ NOTE previous import of `B` here
mod A {} //~ ERROR a module named `A` has already been imported in this module
//~| `A` was already imported
//~| `A` already imported
pub mod B {} //~ ERROR a module named `B` has already been imported in this module
//~| `B` was already imported
//~| `B` already imported
mod C {
use C::D; //~ NOTE previous import of `D` here
mod D {} //~ ERROR a module named `D` has already been imported in this module
//~| `D` was already imported
//~| `D` already imported
}
fn main() {}

View file

@ -15,14 +15,14 @@ use std::ops::Div; //~ NOTE previous import
use std::ops::Rem; //~ NOTE previous import
type Add = bool; //~ ERROR a trait named `Add` has already been imported in this module
//~| was already imported
//~| `Add` already imported
struct Sub { x: f32 } //~ ERROR a trait named `Sub` has already been imported in this module
//~| was already imported
//~| `Sub` already imported
enum Mul { A, B } //~ ERROR a trait named `Mul` has already been imported in this module
//~| was already imported
//~| `Mul` already imported
mod Div { } //~ ERROR a trait named `Div` has already been imported in this module
//~| was already imported
//~| `Div` already imported
trait Rem { } //~ ERROR a trait named `Rem` has already been imported in this module
//~| was already imported
//~| `Rem` already imported
fn main() {}

View file

@ -13,6 +13,6 @@ use std::mem::transmute;
fn transmute() {}
//~^ ERROR a value named `transmute` has already been imported in this module
//~| was already imported
//~| `transmute` already imported
fn main() {
}