about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-13 02:26:30 +0800
committerGitHub <noreply@github.com>2018-01-13 02:26:30 +0800
commite40a6fb1336bb2025b2ef348c7caf4b4f39d90cd (patch)
treef3b9db2afc2275dae287b0b0fa27dfe4d093b22b /src/test/compile-fail
parent8aab0cc861e48590964a88fa06e1d7c6d29ecbf3 (diff)
parent7b420cf3da1e5ff7675923cc25a2d39715d300b6 (diff)
downloadrust-e40a6fb1336bb2025b2ef348c7caf4b4f39d90cd.tar.gz
rust-e40a6fb1336bb2025b2ef348c7caf4b4f39d90cd.zip
Rollup merge of #47298 - cramertj:path-as-modrs, r=nikomatsakis
Treat #[path] files as mod.rs files

Fixes https://github.com/rust-lang/rust/issues/46936, cc @briansmith, @SergioBenitez, @nikomatsakis.

This (insta-stable) change treats files included via `#[path = "bla.rs"] mod foo;` as though they were `mod.rs` files. Namely, it allows them to include `mod` statements and looks for the child modules in sibling directories, rather than in relative `modname/childmodule.rs` files as happens for non-`mod.rs` files.

This change makes the `non_modrs_mods` feature backwards compatible with the existing usage in https://github.com/briansmith/ring, several versions of which are currently broken in beta. If we decide to merge, this change should be backported to beta.

cc https://github.com/rust-lang/rust/issues/37872

r? @jseyfried
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/directory_ownership/backcompat-warnings.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/compile-fail/directory_ownership/backcompat-warnings.rs b/src/test/compile-fail/directory_ownership/backcompat-warnings.rs
deleted file mode 100644
index 2da07a2cc72..00000000000
--- a/src/test/compile-fail/directory_ownership/backcompat-warnings.rs
+++ /dev/null
@@ -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() {}