Skip to content

Treat #[path] files as mod.rs files #47298

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 12, 2018
Merged

Conversation

cramertj
Copy link
Member

@cramertj cramertj commented Jan 9, 2018

Fixes #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 #37872

r? @jseyfried

@kennytm kennytm added T-lang Relevant to the language team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jan 10, 2018
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 10, 2018

📌 Commit 7b420cf has been approved by nikomatsakis

kennytm added a commit to kennytm/rust that referenced this pull request Jan 11, 2018
Treat #[path] files as mod.rs files

Fixes rust-lang#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 rust-lang#37872

r? @jseyfried
kennytm added a commit to kennytm/rust that referenced this pull request Jan 11, 2018
Treat #[path] files as mod.rs files

Fixes rust-lang#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 rust-lang#37872

r? @jseyfried
bors added a commit that referenced this pull request Jan 11, 2018
Rollup of 12 pull requests

- Successful merges: #47283, #47288, #47289, #47298, #47305, #47307, #47310, #47322, #47324, #47328, #47340, #47344
- Failed merges:
@nikomatsakis nikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jan 11, 2018
bors added a commit that referenced this pull request Jan 12, 2018
Rollup of 12 pull requests

- Successful merges: #47283, #47288, #47289, #47298, #47305, #47307, #47310, #47322, #47324, #47328, #47340, #47344
- Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request Jan 12, 2018
Treat #[path] files as mod.rs files

Fixes rust-lang#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 rust-lang#37872

r? @jseyfried
bors added a commit that referenced this pull request Jan 12, 2018
@Mark-Simulacrum
Copy link
Member

@bors p=1 (unbreaks ring)

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2018
bors added a commit that referenced this pull request Jan 12, 2018
@bors bors merged commit 7b420cf into rust-lang:master Jan 12, 2018
@cramertj cramertj deleted the path-as-modrs branch January 12, 2018 23:34
musoke added a commit to musoke/ruma-signatures that referenced this pull request Jan 17, 2018
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 18, 2018
musoke added a commit to musoke/olm-rs that referenced this pull request Jan 20, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants