Updated error message E0252
This commit is contained in:
parent
802d0811a5
commit
f4dd1f9500
4 changed files with 10 additions and 4 deletions
|
|
@ -7,8 +7,6 @@
|
|||
// <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(no_core)]
|
||||
#![no_core]
|
||||
|
||||
// This tests that conflicting imports shows both `use` lines
|
||||
// when reporting the error.
|
||||
|
|
@ -23,5 +21,6 @@ mod sub2 {
|
|||
|
||||
use sub1::foo; //~ NOTE previous import of `foo` here
|
||||
use sub2::foo; //~ ERROR a value named `foo` has already been imported in this module [E0252]
|
||||
//~| NOTE already imported
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
use std::sync::{self, Arc}; //~ NOTE previous import
|
||||
//~^ NOTE previous import
|
||||
use std::sync::Arc; //~ ERROR a type named
|
||||
//~| NOTE already imported
|
||||
use std::sync; //~ ERROR a module named
|
||||
//~| NOTE already imported
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ use foo::bar::{
|
|||
Bar,
|
||||
self
|
||||
//~^ NOTE another `self` import appears here
|
||||
//~^^ ERROR a module named `bar` has already been imported in this module
|
||||
//~| ERROR a module named `bar` has already been imported in this module
|
||||
//~| NOTE already imported
|
||||
};
|
||||
|
||||
use {self};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue