rust/tests/ui/imports/issue-4865-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
433 B
Rust
Raw Normal View History

// run-pass
2015-08-06 18:48:42 +08:00
// Previously, this would have failed to resolve due to the circular
// block between `use say` and `pub use hello::*`.
//
// Now, as `use say` is not `pub`, the glob import can resolve
// without any problem and this resolves fine.
2015-08-06 03:56:49 +08:00
pub use hello::*;
pub mod say {
pub fn hello() { println!("hello"); }
}
pub mod hello {
use say;
pub fn hello() {
say::hello();
}
}
fn main() {
hello();
}