syntax: Bless mod.rs. #4116
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate an error when both are found.
This commit is contained in:
parent
fe3f75ff8e
commit
a74d92e8ab
7 changed files with 82 additions and 16 deletions
18
src/test/run-pass/mod_dir_implicit.rs
Normal file
18
src/test/run-pass/mod_dir_implicit.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
// 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.
|
||||
|
||||
// xfail-pretty
|
||||
// xfail-fast
|
||||
|
||||
mod mod_dir_implicit_aux;
|
||||
|
||||
pub fn main() {
|
||||
assert_eq!(mod_dir_implicit_aux::foo(), 10);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue