Skip to content

Commit eb8dbbe

Browse files
committed
add several resolution test cases
1 parent cb25c5b commit eb8dbbe

19 files changed

+233
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
mod a {
2+
pub type C = i8;
3+
}
4+
5+
mod b {
6+
pub type C = i16;
7+
}
8+
9+
pub use a::*;
10+
pub use b::*;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
macro_rules! m {
2+
() => {
3+
pub fn max() {}
4+
pub(crate) mod max {}
5+
};
6+
}
7+
8+
mod d {
9+
m! {}
10+
}
11+
12+
mod e {
13+
pub type max = i32;
14+
}
15+
16+
pub use self::d::*;
17+
pub use self::e::*;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
mod gio {
2+
pub trait SettingsExt {
3+
fn abc(&self) {}
4+
}
5+
impl<T> SettingsExt for T {}
6+
}
7+
8+
mod gtk {
9+
pub trait SettingsExt {
10+
fn efg(&self) {}
11+
}
12+
impl<T> SettingsExt for T {}
13+
}
14+
15+
pub use gtk::*;
16+
pub use gio::*;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
mod a {
2+
pub type Result<T> = std::result::Result<T, ()>;
3+
}
4+
5+
mod b {
6+
pub type Result<T> = std::result::Result<T, ()>;
7+
}
8+
9+
pub use a::*;
10+
pub use b::*;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub struct Url;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// edition: 2018
2+
// aux-build: issue-114682-5-extern-1.rs
3+
// compile-flags: --extern issue_114682_5_extern_1
4+
5+
pub mod p {
6+
pub use crate::types::*;
7+
pub use crate::*;
8+
}
9+
mod types {
10+
pub mod issue_114682_5_extern_1 {}
11+
}
12+
13+
pub use issue_114682_5_extern_1;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
mod a {
2+
pub fn log() {}
3+
}
4+
mod b {
5+
pub fn log() {}
6+
}
7+
8+
pub use self::a::*;
9+
pub use self::b::*;

tests/ui/imports/glob-conflict-cross-crate.stderr renamed to tests/ui/imports/glob-conflict-cross-crate-1.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0425]: cannot find function `f` in crate `glob_conflict`
2-
--> $DIR/glob-conflict-cross-crate.rs:6:20
2+
--> $DIR/glob-conflict-cross-crate-1.rs:6:20
33
|
44
LL | glob_conflict::f();
55
| ^ not found in `glob_conflict`
66

77
error[E0425]: cannot find function `f` in module `glob_conflict::glob`
8-
--> $DIR/glob-conflict-cross-crate.rs:7:26
8+
--> $DIR/glob-conflict-cross-crate-1.rs:7:26
99
|
1010
LL | glob_conflict::glob::f();
1111
| ^ not found in `glob_conflict::glob`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// aux-build:glob-conflict-cross-crate-2-extern.rs
2+
3+
extern crate glob_conflict_cross_crate_2_extern;
4+
5+
use glob_conflict_cross_crate_2_extern::*;
6+
7+
fn main() {
8+
let _a: C = 1; //~ ERROR cannot find type `C` in this scope
9+
}

0 commit comments

Comments
 (0)