1
Fork 0
rust/src/test/compile-fail/use-super-global-path.rs

26 lines
708 B
Rust
Raw Normal View History

// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(unused)]
struct S;
struct Z;
mod foo {
2017-11-04 23:56:45 +03:00
use ::super::{S, Z}; //~ ERROR unresolved import `super`
pub fn g() {
2017-11-04 23:56:45 +03:00
use ::super::main; //~ ERROR unresolved import `super`
main();
}
}
fn main() { foo::g(); }