1
Fork 0

Rollup merge of #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`
This commit is contained in:
Matthias Krüger 2025-02-11 18:04:49 +01:00 committed by GitHub
commit 89ee41cc4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 53 additions and 51 deletions

View file

@ -108,13 +108,13 @@ impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::ExistentialTrait
}
impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::UnevaluatedConst<I> {
fn into_diag_arg(self) -> rustc_errors::DiagArgValue {
fn into_diag_arg(self) -> DiagArgValue {
format!("{self:?}").into_diag_arg()
}
}
impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::FnSig<I> {
fn into_diag_arg(self) -> rustc_errors::DiagArgValue {
fn into_diag_arg(self) -> DiagArgValue {
format!("{self:?}").into_diag_arg()
}
}