Treat #[path] files as mod.rs files

This commit is contained in:
Taylor Cramer 2018-01-09 10:54:13 -08:00
parent 8e7a609e63
commit 7b420cf3da
7 changed files with 9 additions and 30 deletions

View file

@ -1,16 +0,0 @@
// Copyright 2016 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: mod statements in non-mod.rs files are unstable
#[path="mod_file_not_owning_aux3.rs"]
mod foo;
fn main() {}

View file

@ -34,14 +34,5 @@ error: mod statements in non-mod.rs files are unstable (see issue #44660)
= help: add #![feature(non_modrs_mods)] to the crate attributes to enable
= help: on stable builds, rename this file to inner_foors_mod/mod.rs
error: mod statements in non-mod.rs files are unstable (see issue #44660)
--> $DIR/some_crazy_attr_mod_dir/arbitrary_name.rs:11:9
|
11 | pub mod inner_modrs_mod;
| ^^^^^^^^^^^^^^^
|
= help: add #![feature(non_modrs_mods)] to the crate attributes to enable
= help: on stable builds, rename this file to attr_mod/mod.rs
error: aborting due to 5 previous errors
error: aborting due to 4 previous errors