Skip to content

Commit 4eb9da3

Browse files
committed
Move some tests to subdirectories
1 parent 0f6f2d6 commit 4eb9da3

File tree

139 files changed

+71
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+71
-105
lines changed

src/test/ui/hidden-rt-injection.rs

-8
This file was deleted.

src/test/ui/hidden-rt-injection.stderr

-9
This file was deleted.

src/test/ui/hidden-rt-injection2.rs

-8
This file was deleted.

src/test/ui/hidden-rt-injection2.stderr

-9
This file was deleted.

src/test/ui/import.rs

-17
This file was deleted.

src/test/ui/import2.rs

-10
This file was deleted.

src/test/ui/import3.rs

-4
This file was deleted.

src/test/ui/import4.rs

-7
This file was deleted.
File renamed without changes.
File renamed without changes.

src/test/ui/imports/import-rpass.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// run-pass
2+
mod foo {
3+
pub fn x(y: isize) { println!("{}", y); }
4+
}
5+
6+
mod bar {
7+
use foo::x;
8+
use foo::x as z;
9+
pub fn thing() { x(10); z(10); }
10+
}
11+
12+
pub fn main() { bar::thing(); }

src/test/ui/imports/import.rs

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
// run-pass
2-
mod foo {
3-
pub fn x(y: isize) { println!("{}", y); }
4-
}
1+
use zed::bar;
2+
use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432]
3+
//~| no `baz` in `zed`
4+
//~| HELP a similar name exists in the module
5+
//~| SUGGESTION bar
6+
57

6-
mod bar {
7-
use foo::x;
8-
use foo::x as z;
9-
pub fn thing() { x(10); z(10); }
8+
mod zed {
9+
pub fn bar() { println!("bar"); }
10+
use foo; //~ ERROR unresolved import `foo` [E0432]
11+
//~^ no `foo` in the root
1012
}
1113

12-
pub fn main() { bar::thing(); }
14+
fn main() {
15+
zed::foo(); //~ ERROR `foo` is private
16+
bar();
17+
}
File renamed without changes.

src/test/ui/imports/import2-rpass.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// run-pass
2+
3+
use zed::bar;
4+
5+
mod zed {
6+
pub fn bar() { println!("bar"); }
7+
}
8+
9+
pub fn main() { bar(); }

src/test/ui/imports/import2.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
// run-pass
2-
3-
use zed::bar;
1+
use baz::zed::bar; //~ ERROR unresolved import `baz::zed` [E0432]
2+
//~^ could not find `zed` in `baz`
43

4+
mod baz {}
55
mod zed {
6-
pub fn bar() { println!("bar"); }
6+
pub fn bar() { println!("bar3"); }
7+
}
8+
fn main() {
9+
bar();
710
}
8-
9-
pub fn main() { bar(); }
File renamed without changes.

src/test/ui/imports/import3-rpass.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// run-pass
2+
#![allow(unused_imports)]
3+
4+
use baz::zed;
5+
use baz::zed::bar;
6+
7+
mod baz {
8+
pub mod zed {
9+
pub fn bar() { println!("bar2"); }
10+
}
11+
}
12+
13+
pub fn main() { bar(); }

src/test/ui/imports/import3.rs

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
// run-pass
2-
#![allow(unused_imports)]
1+
// error-pattern: unresolved
2+
use main::bar;
33

4-
use baz::zed;
5-
use baz::zed::bar;
6-
7-
mod baz {
8-
pub mod zed {
9-
pub fn bar() { println!("bar2"); }
10-
}
11-
}
12-
13-
pub fn main() { bar(); }
4+
fn main() { println!("foo"); }
File renamed without changes.

src/test/ui/imports/import4-rpass.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// run-pass
2+
3+
use zed::bar;
4+
5+
mod zed {
6+
pub fn bar() { println!("bar"); }
7+
}
8+
9+
pub fn main() { let _zed = 42; bar(); }

src/test/ui/imports/import4.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// run-pass
1+
// error-pattern: import
22

3-
use zed::bar;
43

5-
mod zed {
6-
pub fn bar() { println!("bar"); }
7-
}
4+
mod a { pub use b::foo; }
5+
mod b { pub use a::foo; }
86

9-
pub fn main() { let _zed = 42; bar(); }
7+
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.

0 commit comments

Comments
 (0)