about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/generic_graphviz.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-11 13:58:38 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-11 14:59:13 +1100
commitaf6020320d32fb3491b8d30b580f675a2e1d16a6 (patch)
tree80a22b7df3efd083be1a625d21474f2984f8f5d8 /compiler/rustc_middle/src/mir/generic_graphviz.rs
parent6171d944aea415a3023d4262e0895aa3b18c771f (diff)
downloadrust-af6020320d32fb3491b8d30b580f675a2e1d16a6.tar.gz
rust-af6020320d32fb3491b8d30b580f675a2e1d16a6.zip
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.
Diffstat (limited to 'compiler/rustc_middle/src/mir/generic_graphviz.rs')
-rw-r--r--compiler/rustc_middle/src/mir/generic_graphviz.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/generic_graphviz.rs b/compiler/rustc_middle/src/mir/generic_graphviz.rs
index e1c3d8156d8..bce7beb521d 100644
--- a/compiler/rustc_middle/src/mir/generic_graphviz.rs
+++ b/compiler/rustc_middle/src/mir/generic_graphviz.rs
@@ -2,7 +2,8 @@ use std::io::{self, Write};
 
 use rustc_data_structures::graph::{self, iterate};
 use rustc_graphviz as dot;
-use rustc_middle::ty::TyCtxt;
+
+use crate::ty::TyCtxt;
 
 pub struct GraphvizWriter<
     'a,