Auto merge of #30408 - durka:issue-26873, r=alexcrichton
I think we can close #26873 with these tests.
This commit is contained in:
commit
fec739bee2
16
src/test/run-pass/issue-26873-multifile.rs
Normal file
16
src/test/run-pass/issue-26873-multifile.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2015 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.
|
||||
//
|
||||
// ignore-pretty
|
||||
|
||||
mod issue_26873_multifile;
|
||||
|
||||
fn main() {}
|
||||
|
31
src/test/run-pass/issue-26873-onefile.rs
Normal file
31
src/test/run-pass/issue-26873-onefile.rs
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
mod A {
|
||||
pub mod B {
|
||||
use super::*;
|
||||
|
||||
pub struct S;
|
||||
}
|
||||
|
||||
pub mod C {
|
||||
use super::*;
|
||||
use super::B::S;
|
||||
|
||||
pub struct T;
|
||||
}
|
||||
|
||||
pub use self::C::T;
|
||||
}
|
||||
|
||||
use A::*;
|
||||
|
||||
fn main() {}
|
||||
|
14
src/test/run-pass/issue_26873_multifile/A/B.rs
Normal file
14
src/test/run-pass/issue_26873_multifile/A/B.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
use super::*;
|
||||
|
||||
pub struct S;
|
||||
|
16
src/test/run-pass/issue_26873_multifile/A/C.rs
Normal file
16
src/test/run-pass/issue_26873_multifile/A/C.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
use super::*;
|
||||
|
||||
use super::B::S;
|
||||
|
||||
pub struct T { i: i32 }
|
||||
|
15
src/test/run-pass/issue_26873_multifile/A/mod.rs
Normal file
15
src/test/run-pass/issue_26873_multifile/A/mod.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
pub mod B;
|
||||
pub mod C;
|
||||
|
||||
pub use self::C::T;
|
||||
|
14
src/test/run-pass/issue_26873_multifile/mod.rs
Normal file
14
src/test/run-pass/issue_26873_multifile/mod.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
mod A;
|
||||
|
||||
use self::A::*;
|
||||
|
Loading…
x
Reference in New Issue
Block a user