Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #47298 to beta #47399

Merged
merged 2 commits into from
Jan 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub const CFG_RELEASE_NUM: &str = "1.24.0";
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
// Be sure to make this starts with a dot to conform to semver pre-release
// versions (section 9)
pub const CFG_PRERELEASE_VERSION: &str = ".2";
pub const CFG_PRERELEASE_VERSION: &str = ".3";

pub struct GitInfo {
inner: Option<Info>,
Expand Down
12 changes: 8 additions & 4 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5876,10 +5876,14 @@ impl<'a> Parser<'a> {
if let Some(path) = Parser::submod_path_from_attr(outer_attrs, &self.directory.path) {
return Ok(ModulePathSuccess {
directory_ownership: match path.file_name().and_then(|s| s.to_str()) {
Some("mod.rs") => DirectoryOwnership::Owned { relative: None },
Some(_) => {
DirectoryOwnership::Owned { relative: Some(id) }
}
// All `#[path]` files are treated as though they are a `mod.rs` file.
// This means that `mod foo;` declarations inside `#[path]`-included
// files are siblings,
//
// Note that this will produce weirdness when a file named `foo.rs` is
// `#[path]` included and contains a `mod foo;` declaration.
// If you encounter this, it's your own darn fault :P
Some(_) => DirectoryOwnership::Owned { relative: None },
_ => DirectoryOwnership::UnownedViaMod(true),
},
path,
Expand Down
16 changes: 0 additions & 16 deletions src/test/compile-fail/directory_ownership/backcompat-warnings.rs

This file was deleted.

11 changes: 1 addition & 10 deletions src/test/ui/non_modrs_mods/non_modrs_mods.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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