rust/tests/ui/use/use-super-global-path.rs

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

17 lines
342 B
Rust
Raw Normal View History

#![allow(unused)]
struct S;
struct Z;
mod foo {
use ::super::{S, Z}; //~ ERROR global paths cannot start with `super`
2020-01-08 17:02:10 +00:00
//~| ERROR global paths cannot start with `super`
pub fn g() {
use ::super::main; //~ ERROR global paths cannot start with `super`
main();
}
}
fn main() { foo::g(); }