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.
This commit is contained in:
@@ -2,9 +2,9 @@ pub mod bug;
|
||||
|
||||
#[derive(Default, Copy, Clone)]
|
||||
pub struct Providers {
|
||||
pub queries: rustc_middle::query::Providers,
|
||||
pub extern_queries: rustc_middle::query::ExternProviders,
|
||||
pub hooks: rustc_middle::hooks::Providers,
|
||||
pub queries: crate::query::Providers,
|
||||
pub extern_queries: crate::query::ExternProviders,
|
||||
pub hooks: crate::hooks::Providers,
|
||||
}
|
||||
|
||||
/// Backwards compatibility hack to keep the diff small. This
|
||||
@@ -17,7 +17,7 @@ impl std::ops::DerefMut for Providers {
|
||||
}
|
||||
|
||||
impl std::ops::Deref for Providers {
|
||||
type Target = rustc_middle::query::Providers;
|
||||
type Target = crate::query::Providers;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.queries
|
||||
|
||||
Reference in New Issue
Block a user