1
Fork 0

Remove duplicate tests for uniform paths

This commit is contained in:
Vadim Petrochenkov 2018-11-23 00:50:15 +03:00
parent 6bfb46e4ac
commit fba116fc5f
13 changed files with 0 additions and 312 deletions

View file

@ -1,29 +0,0 @@
// Copyright 2018 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.
// edition:2018
// This test is similar to `ambiguity-macros.rs`, but nested in a module.
mod foo {
pub use std::io;
//~^ ERROR `std` is ambiguous
macro_rules! m {
() => {
mod std {
pub struct io;
}
}
}
m!();
}
fn main() {}

View file

@ -1,23 +0,0 @@
error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
--> $DIR/ambiguity-macros-nested.rs:16:13
|
LL | pub use std::io;
| ^^^ ambiguous name
|
= note: `std` could refer to a built-in extern crate
= help: use `::std` to refer to this extern crate unambiguously
note: `std` could also refer to the module defined here
--> $DIR/ambiguity-macros-nested.rs:21:13
|
LL | / mod std {
LL | | pub struct io;
LL | | }
| |_____________^
...
LL | m!();
| ----- in this macro invocation
= help: use `self::std` to refer to this module unambiguously
error: aborting due to previous error
For more information about this error, try `rustc --explain E0659`.

View file

@ -1,27 +0,0 @@
// Copyright 2018 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.
// edition:2018
// This test is similar to `ambiguity.rs`, but with macros defining local items.
use std::io;
//~^ ERROR `std` is ambiguous
macro_rules! m {
() => {
mod std {
pub struct io;
}
}
}
m!();
fn main() {}

View file

@ -1,23 +0,0 @@
error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
--> $DIR/ambiguity-macros.rs:15:5
|
LL | use std::io;
| ^^^ ambiguous name
|
= note: `std` could refer to a built-in extern crate
= help: use `::std` to refer to this extern crate unambiguously
note: `std` could also refer to the module defined here
--> $DIR/ambiguity-macros.rs:20:9
|
LL | / mod std {
LL | | pub struct io;
LL | | }
| |_________^
...
LL | m!();
| ----- in this macro invocation
= help: use `self::std` to refer to this module unambiguously
error: aborting due to previous error
For more information about this error, try `rustc --explain E0659`.

View file

@ -1,24 +0,0 @@
// Copyright 2018 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.
// edition:2018
// This test is similar to `ambiguity.rs`, but nested in a module.
mod foo {
pub use std::io;
//~^ ERROR `std` is ambiguous
mod std {
pub struct io;
}
}
fn main() {}

View file

@ -1,20 +0,0 @@
error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
--> $DIR/ambiguity-nested.rs:16:13
|
LL | pub use std::io;
| ^^^ ambiguous name
|
= note: `std` could refer to a built-in extern crate
= help: use `::std` to refer to this extern crate unambiguously
note: `std` could also refer to the module defined here
--> $DIR/ambiguity-nested.rs:19:5
|
LL | / mod std {
LL | | pub struct io;
LL | | }
| |_____^
= help: use `self::std` to refer to this module unambiguously
error: aborting due to previous error
For more information about this error, try `rustc --explain E0659`.

View file

@ -1,20 +0,0 @@
// Copyright 2018 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.
// edition:2018
use std::io;
//~^ ERROR `std` is ambiguous
mod std {
pub struct io;
}
fn main() {}

View file

@ -1,20 +0,0 @@
error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
--> $DIR/ambiguity.rs:13:5
|
LL | use std::io;
| ^^^ ambiguous name
|
= note: `std` could refer to a built-in extern crate
= help: use `::std` to refer to this extern crate unambiguously
note: `std` could also refer to the module defined here
--> $DIR/ambiguity.rs:16:1
|
LL | / mod std {
LL | | pub struct io;
LL | | }
| |_^
= help: use `self::std` to refer to this module unambiguously
error: aborting due to previous error
For more information about this error, try `rustc --explain E0659`.

View file

@ -1,21 +0,0 @@
// Copyright 2018 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.
// edition:2018
struct std;
fn main() {
fn std() {}
enum std {}
use std as foo;
//~^ ERROR `std` is ambiguous
//~| ERROR `std` is ambiguous
}

View file

@ -1,39 +0,0 @@
error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
--> $DIR/block-scoped-shadow.rs:18:9
|
LL | use std as foo;
| ^^^ ambiguous name
|
note: `std` could refer to the enum defined here
--> $DIR/block-scoped-shadow.rs:17:5
|
LL | enum std {}
| ^^^^^^^^^^^
note: `std` could also refer to the struct defined here
--> $DIR/block-scoped-shadow.rs:13:1
|
LL | struct std;
| ^^^^^^^^^^^
= help: use `self::std` to refer to this struct unambiguously
error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
--> $DIR/block-scoped-shadow.rs:18:9
|
LL | use std as foo;
| ^^^ ambiguous name
|
note: `std` could refer to the function defined here
--> $DIR/block-scoped-shadow.rs:16:5
|
LL | fn std() {}
| ^^^^^^^^^^^
note: `std` could also refer to the unit struct defined here
--> $DIR/block-scoped-shadow.rs:13:1
|
LL | struct std;
| ^^^^^^^^^^^
= help: use `self::std` to refer to this unit struct unambiguously
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0659`.

View file

@ -1,27 +0,0 @@
// Copyright 2018 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.
// edition:2018
// Dummy import that previously introduced uniform path canaries.
use std;
// fn version() -> &'static str {""}
mod foo {
// Error wasn't reported, despite `version` being commented out above.
use crate::version; //~ ERROR unresolved import `crate::version`
fn bar() {
version();
}
}
fn main() {}

View file

@ -1,9 +0,0 @@
error[E0432]: unresolved import `crate::version`
--> $DIR/issue-54253.rs:20:9
|
LL | use crate::version; //~ ERROR unresolved import `crate::version`
| ^^^^^^^^^^^^^^ no `version` in the root
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.

View file

@ -1,30 +0,0 @@
// Copyright 2018 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.
// run-pass
// edition:2018
use std;
use std::io;
mod foo {
pub use std as my_std;
}
mod bar {
pub use std::{self};
}
fn main() {
io::stdout();
self::std::io::stdout();
foo::my_std::io::stdout();
bar::std::io::stdout();
}