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 intra-crate qualifiers. #136847

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

nnethercote
Copy link
Contributor

The following is a weird pattern for a file within rustc_middle:

use rustc_middle::aaa;
use crate::bbb;

More sensible and standard would be this:

use crate::{aaa, bbb};

I.e. we generally prefer using crate:: to using a crate's own name. (Exceptions are things like in macros where crate:: doesn't work because the macro is used in multiple crates.)

This commit fixes a bunch of these weird qualifiers.

r? @jieyouxu

The following is a weird pattern for a file within `rustc_middle`:
```
use rustc_middle::aaa;
use crate::bbb;
```
More sensible and standard would be this:
```
use crate::{aaa, bbb};
```
I.e. we generally prefer using `crate::` to using a crate's own name.
(Exceptions are things like in macros where `crate::` doesn't work
because the macro is used in multiple crates.)

This commit fixes a bunch of these weird qualifiers.
@rustbot rustbot added 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. labels Feb 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 11, 2025

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri, @rust-lang/wg-const-eval

@oli-obk
Copy link
Contributor

oli-obk commented Feb 11, 2025

r? @oli-obk

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 11, 2025

📌 Commit af60203 has been approved by oli-obk

It is now in the queue for this repository.

@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 Feb 11, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#135285 (it-self → itself, build-system → build system, type-alias → type alias)
 - rust-lang#135677 (Small `rustc_resolve` cleanups)
 - rust-lang#136239 (show supported register classes in error message)
 - rust-lang#136246 (include note on variance and example)
 - rust-lang#136354 (Update docs for impl keyword)
 - rust-lang#136786 (Remove the deduplicate_blocks pass)
 - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen)
 - rust-lang#136847 (Simplify intra-crate qualifiers.)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#135285 (it-self → itself, build-system → build system, type-alias → type alias)
 - rust-lang#135677 (Small `rustc_resolve` cleanups)
 - rust-lang#136239 (show supported register classes in error message)
 - rust-lang#136246 (include note on variance and example)
 - rust-lang#136354 (Update docs for impl keyword)
 - rust-lang#136786 (Remove the deduplicate_blocks pass)
 - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen)
 - rust-lang#136847 (Simplify intra-crate qualifiers.)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2025
Rollup merge of rust-lang#136847 - nnethercote:simplify-intra-crate-quals, r=oli-obk

Simplify intra-crate qualifiers.

The following is a weird pattern for a file within `rustc_middle`:
```
use rustc_middle::aaa;
use crate::bbb;
```
More sensible and standard would be this:
```
use crate::{aaa, bbb};
```
I.e. we generally prefer using `crate::` to using a crate's own name. (Exceptions are things like in macros where `crate::` doesn't work because the macro is used in multiple crates.)

This commit fixes a bunch of these weird qualifiers.

r? `@jieyouxu`
@bors bors merged commit 89ee41c into rust-lang:master Feb 12, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants