rust/src/test/run-pass/export-glob.rs

30 lines
843 B
Rust
Raw Normal View History

// xfail-fast
// Copyright 2012 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.
// Test that a glob-export functions as an explicit
// named export when referenced from outside its scope.
// Modified to not use export since it's going away. --pcw
mod foo {
#[legacy_exports];
use foo::bar::*;
export a;
export bar;
mod bar {
#[legacy_exports];
const a : int = 10;
}
}
fn main() { let v = foo::a; }