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

resolve: Do not put nonexistent crate meta into prelude #75802

Merged
merged 1 commit into from
Oct 17, 2020

Conversation

petrochenkov
Copy link
Contributor

Before the 2018 edition release there was some vague suggestion about adding a crate named meta to the standard distribution.
On this basis the name meta was "partially reserved" by putting meta into extern prelude (this means importing something named meta will result in an ambiguity error, for example).
This only caused confusion so far, and two years later there are no specific plans to add such crate.

If some standard crate (named meta or not) is added in the future, then cargo will hopefully already have ability to put it into extern prelude explicitly through Cargo.toml.
Otherwise, it could be added to extern prelude by the compiler at edition boundary.

Closes #73948

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 22, 2020
@petrochenkov petrochenkov added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Aug 22, 2020
@petrochenkov petrochenkov mentioned this pull request Aug 22, 2020
@bors
Copy link
Contributor

bors commented Aug 30, 2020

☔ The latest upstream changes (presumably #74862) made this pull request unmergeable. Please resolve the merge conflicts.

@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2020
@petrochenkov
Copy link
Contributor Author

Could someone from lang team to look at this?
I'm pretty sure meta isn't going to be a thing in 2018 edition time frame, so we can remove this future-proofing.

@joshtriplett
Copy link
Member

This seems reasonable. Our policy changed since the 2018 edition, and we no longer reserve keyword-like things until there's a concrete proposal.

There's still support in the @rust-lang/lang team for using the name meta for any future introduction of things from the sysroot, to avoid introducing more top-level names. But it makes sense that doing so should require some indication in Cargo.toml`, rather than something fully implicit.

Given that:

@rfcbot merge

We'd welcome someone submitting concrete patches adding sysroot names under a built-in crate meta, along with cargo patches, though.

@rfcbot
Copy link

rfcbot commented Oct 5, 2020

Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 5, 2020
@petrochenkov petrochenkov added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2020
@pietroalbini
Copy link
Member

As per @pnkfelix's request on Discord, the meta crate on crates.io was transferred to the Rust project (the author consented the transfer to anyone requesting it).

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Oct 6, 2020
@rfcbot
Copy link

rfcbot commented Oct 6, 2020

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Oct 16, 2020
@rfcbot
Copy link

rfcbot commented Oct 16, 2020

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot added the to-announce Announce this issue on triage meeting label Oct 16, 2020
@nikomatsakis
Copy link
Contributor

r=me once rebased

@petrochenkov
Copy link
Contributor Author

@bors r=nikomatsakis rollup

@bors
Copy link
Contributor

bors commented Oct 17, 2020

📌 Commit 3522add has been approved by nikomatsakis

@bors bors 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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Oct 17, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 17, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#75802 (resolve: Do not put nonexistent crate `meta` into prelude)
 - rust-lang#76607 (Modify executable checking to be more universal)
 - rust-lang#77851 (BTreeMap: refactor Entry out of map.rs into its own file)
 - rust-lang#78043 (Fix grammar in note for orphan-rule error [E0210])
 - rust-lang#78048 (Suggest correct place to add `self` parameter when inside closure)
 - rust-lang#78050 (Small CSS cleanup)
 - rust-lang#78059 (Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkchecker)

Failed merges:

r? `@ghost`
@bors bors merged commit d10b98d into rust-lang:master Oct 17, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 17, 2020
@spastorino spastorino removed the to-announce Announce this issue on triage meeting label Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. 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.

meta not indicated as reserved crate name when shadowing module
10 participants