diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/circular_modules_main.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/mod_file_not_owning.rs | 15 | ||||
| -rw-r--r-- | src/test/compile-fail/mod_file_not_owning_aux1.rs | 13 | ||||
| -rw-r--r-- | src/test/compile-fail/mod_file_not_owning_aux2.rs | 11 | ||||
| -rw-r--r-- | src/test/run-pass/mod_dir_simple/load_another_mod.rs | 1 |
5 files changed, 41 insertions, 1 deletions
diff --git a/src/test/compile-fail/circular_modules_main.rs b/src/test/compile-fail/circular_modules_main.rs index bc9f3247db7..7296ea655c2 100644 --- a/src/test/compile-fail/circular_modules_main.rs +++ b/src/test/compile-fail/circular_modules_main.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - +#[path = "circular_modules_hello.rs"] mod circular_modules_hello; //~ERROR: circular modules pub fn hi_str() -> StrBuf { diff --git a/src/test/compile-fail/mod_file_not_owning.rs b/src/test/compile-fail/mod_file_not_owning.rs new file mode 100644 index 00000000000..adbcedd91f2 --- /dev/null +++ b/src/test/compile-fail/mod_file_not_owning.rs @@ -0,0 +1,15 @@ +// Copyright 2014 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. + +// error-pattern: cannot declare a new module at this location + +mod mod_file_not_owning_aux1; + +fn main() {} diff --git a/src/test/compile-fail/mod_file_not_owning_aux1.rs b/src/test/compile-fail/mod_file_not_owning_aux1.rs new file mode 100644 index 00000000000..2d522be6dc5 --- /dev/null +++ b/src/test/compile-fail/mod_file_not_owning_aux1.rs @@ -0,0 +1,13 @@ +// Copyright 2014 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-test this is not a test + +mod mod_file_not_owning_aux2; diff --git a/src/test/compile-fail/mod_file_not_owning_aux2.rs b/src/test/compile-fail/mod_file_not_owning_aux2.rs new file mode 100644 index 00000000000..41401d640f6 --- /dev/null +++ b/src/test/compile-fail/mod_file_not_owning_aux2.rs @@ -0,0 +1,11 @@ +// Copyright 2014 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-test this is not a test diff --git a/src/test/run-pass/mod_dir_simple/load_another_mod.rs b/src/test/run-pass/mod_dir_simple/load_another_mod.rs index c11b1e8c074..ca45864a5a1 100644 --- a/src/test/run-pass/mod_dir_simple/load_another_mod.rs +++ b/src/test/run-pass/mod_dir_simple/load_another_mod.rs @@ -8,4 +8,5 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[path = "test.rs"] pub mod test; |
