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

Simplify use crate::rustc_foo::bar occurrences. #124876

Merged
merged 1 commit into from
May 8, 2024

Conversation

nnethercote
Copy link
Contributor

They can just be written as use rustc_foo::bar, which is far more standard. (I didn't even know that a crate:: prefix was valid.)

r? @eholk

They can just be written as `use rustc_foo::bar`, which is far more
standard. (I didn't even know that a `crate::` prefix was valid.)
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 8, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 8, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

The Miri subtree was changed

cc @rust-lang/miri

@nnethercote
Copy link
Contributor Author

nnethercote commented May 8, 2024

Hmm, seems like use crate::rustc_foo::bar is only valid if you also have extern crate rustc_foo in the crate? No matter, use rustc_foo::bar is clearly superior.

@RalfJung
Copy link
Member

RalfJung commented May 8, 2024 via email

@compiler-errors
Copy link
Member

r? compiler-errors @bors r+

@bors
Copy link
Contributor

bors commented May 8, 2024

📌 Commit b68b920 has been approved by compiler-errors

It is now in the queue for this repository.

@rustbot rustbot assigned compiler-errors and unassigned eholk May 8, 2024
@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-review Status: Awaiting review from the assignee but also interested parties. labels May 8, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 8, 2024
…, r=compiler-errors

Simplify `use crate::rustc_foo::bar` occurrences.

They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)

r? `@eholk`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#123344 (Remove braces when fixing a nested use tree into a single item)
 - rust-lang#124587 (Generic `NonZero` post-stabilization changes.)
 - rust-lang#124775 (crashes: add lastest batch of crash tests)
 - rust-lang#124869 (Make sure we don't deny macro vars w keyword names)
 - rust-lang#124876 (Simplify `use crate::rustc_foo::bar` occurrences.)
 - rust-lang#124892 (Update cc crate to v1.0.97)
 - rust-lang#124903 (Ignore empty RUSTC_WRAPPER in bootstrap)
 - rust-lang#124909 (Reapply the part of rust-lang#124548 that bors forgot)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3e22ea9 into rust-lang:master May 8, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
Rollup merge of rust-lang#124876 - nnethercote:rm-use-crate-rustc_foo, r=compiler-errors

Simplify `use crate::rustc_foo::bar` occurrences.

They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)

r? ``@eholk``
@nnethercote nnethercote deleted the rm-use-crate-rustc_foo branch May 9, 2024 04:20
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 17, 2024
…, r=compiler-errors

Simplify `use crate::rustc_foo::bar` occurrences.

They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)

r? ``@eholk``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants