Skip to content

Commit 6b7db50

Browse files
committed
Simplify use crate::rustc_foo::bar occurrences.
They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)
1 parent efa15eb commit 6b7db50

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/debuginfo.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
use crate::rustc_index::Idx;
21
use gccjit::{Location, RValue};
32
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
43
use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoMethods};
54
use rustc_data_structures::sync::Lrc;
65
use rustc_index::bit_set::BitSet;
7-
use rustc_index::IndexVec;
6+
use rustc_index::{Idx, IndexVec};
87
use rustc_middle::mir::{self, Body, SourceScope};
98
use rustc_middle::ty::{Instance, PolyExistentialTraitRef, Ty};
109
use rustc_session::config::DebugInfo;

src/type_of.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::fmt::Write;
22

3-
use crate::rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods};
43
use gccjit::{Struct, Type};
4+
use rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods};
55
use rustc_middle::bug;
66
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
77
use rustc_middle::ty::print::with_no_trimmed_paths;
@@ -205,7 +205,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
205205
/// of that field's type - this is useful for taking the address of
206206
/// that field and ensuring the struct has the right alignment.
207207
fn gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc> {
208-
use crate::rustc_middle::ty::layout::FnAbiOf;
208+
use rustc_middle::ty::layout::FnAbiOf;
209209
// This must produce the same result for `repr(transparent)` wrappers as for the inner type!
210210
// In other words, this should generally not look at the type at all, but only at the
211211
// layout.

0 commit comments

Comments
 (0)