diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-11 18:04:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-11 18:04:49 +0100 |
| commit | 89ee41cc4c9c19d56f6c30da5c8883f87019a90b (patch) | |
| tree | 1164b3bfb6f35ba6cbc3412c3db79f5c1e684eb3 /compiler/rustc_errors | |
| parent | 8ade6baa12a0a7d88738c2d9552d64aad9871512 (diff) | |
| parent | af6020320d32fb3491b8d30b580f675a2e1d16a6 (diff) | |
| download | rust-89ee41cc4c9c19d56f6c30da5c8883f87019a90b.tar.gz rust-89ee41cc4c9c19d56f6c30da5c8883f87019a90b.zip | |
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`
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_impls.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index d179396398f..14baf7554bc 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -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() } } |
