Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move some tests to subdirectories #79776

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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.