Skip to content

Commit

Permalink
Auto merge of rust-lang#79776 - petrochenkov:mvtest, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Move some tests to subdirectories

Mostly tests related to imports.
(A couple of very outdated tests is also deleted.)

Part of rust-lang#73494.
  • Loading branch information
bors committed Dec 7, 2020
2 parents 0f6f2d6 + 4eb9da3 commit f00ace9
Show file tree
Hide file tree
Showing 139 changed files with 71 additions and 105 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions src/test/ui/hidden-rt-injection.rs

This file was deleted.

9 changes: 0 additions & 9 deletions src/test/ui/hidden-rt-injection.stderr

This file was deleted.

8 changes: 0 additions & 8 deletions src/test/ui/hidden-rt-injection2.rs

This file was deleted.

9 changes: 0 additions & 9 deletions src/test/ui/hidden-rt-injection2.stderr

This file was deleted.

17 changes: 0 additions & 17 deletions src/test/ui/import.rs

This file was deleted.

10 changes: 0 additions & 10 deletions src/test/ui/import2.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/test/ui/import3.rs

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/ui/import4.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions src/test/ui/imports/import-rpass.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// run-pass
mod foo {
pub fn x(y: isize) { println!("{}", y); }
}

mod bar {
use foo::x;
use foo::x as z;
pub fn thing() { x(10); z(10); }
}

pub fn main() { bar::thing(); }
23 changes: 14 additions & 9 deletions src/test/ui/imports/import.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
// run-pass
mod foo {
pub fn x(y: isize) { println!("{}", y); }
}
use zed::bar;
use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432]
//~| no `baz` in `zed`
//~| HELP a similar name exists in the module
//~| SUGGESTION bar


mod bar {
use foo::x;
use foo::x as z;
pub fn thing() { x(10); z(10); }
mod zed {
pub fn bar() { println!("bar"); }
use foo; //~ ERROR unresolved import `foo` [E0432]
//~^ no `foo` in the root
}

pub fn main() { bar::thing(); }
fn main() {
zed::foo(); //~ ERROR `foo` is private
bar();
}
File renamed without changes.
9 changes: 9 additions & 0 deletions src/test/ui/imports/import2-rpass.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// run-pass

use zed::bar;

mod zed {
pub fn bar() { println!("bar"); }
}

pub fn main() { bar(); }
13 changes: 7 additions & 6 deletions src/test/ui/imports/import2.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// run-pass

use zed::bar;
use baz::zed::bar; //~ ERROR unresolved import `baz::zed` [E0432]
//~^ could not find `zed` in `baz`

mod baz {}
mod zed {
pub fn bar() { println!("bar"); }
pub fn bar() { println!("bar3"); }
}
fn main() {
bar();
}

pub fn main() { bar(); }
File renamed without changes.
13 changes: 13 additions & 0 deletions src/test/ui/imports/import3-rpass.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// run-pass
#![allow(unused_imports)]

use baz::zed;
use baz::zed::bar;

mod baz {
pub mod zed {
pub fn bar() { println!("bar2"); }
}
}

pub fn main() { bar(); }
15 changes: 3 additions & 12 deletions src/test/ui/imports/import3.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
// run-pass
#![allow(unused_imports)]
// error-pattern: unresolved
use main::bar;

use baz::zed;
use baz::zed::bar;

mod baz {
pub mod zed {
pub fn bar() { println!("bar2"); }
}
}

pub fn main() { bar(); }
fn main() { println!("foo"); }
File renamed without changes.
9 changes: 9 additions & 0 deletions src/test/ui/imports/import4-rpass.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// run-pass

use zed::bar;

mod zed {
pub fn bar() { println!("bar"); }
}

pub fn main() { let _zed = 42; bar(); }
10 changes: 4 additions & 6 deletions src/test/ui/imports/import4.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// run-pass
// error-pattern: import

use zed::bar;

mod zed {
pub fn bar() { println!("bar"); }
}
mod a { pub use b::foo; }
mod b { pub use a::foo; }

pub fn main() { let _zed = 42; bar(); }
fn main() { println!("loop"); }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f00ace9

Please sign in to comment.