Skip to content

Commit 30ac06f

Browse files
committed
Add a regression test and organize tests.
1 parent 5675d9d commit 30ac06f

File tree

8 files changed

+19
-3
lines changed

8 files changed

+19
-3
lines changed

src/test/compile-fail/mod_file_not_owning.rs renamed to src/test/compile-fail/directory_ownership/mod_file_not_owning.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// compile-flags: -Z parse-only
12-
1311
// error-pattern: cannot declare a new module at this location
1412

1513
mod mod_file_not_owning_aux1;

src/test/compile-fail/mod_file_not_owning_aux1.rs renamed to src/test/compile-fail/directory_ownership/mod_file_not_owning_aux1.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010

1111
// ignore-test this is not a test
1212

13-
mod mod_file_not_owning_aux2;
13+
macro_rules! m {
14+
() => { mod mod_file_not_owning_aux2; }
15+
}
16+
m!();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// error-pattern: cannot declare a new module at this location
12+
13+
// This is not a directory owner since the file name is not "mod.rs".
14+
#[path = "mod_file_not_owning_aux1.rs"]
15+
mod foo;

0 commit comments

Comments
 (0)