From ad875529bf792069350ae3899daa2102f247837b Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 4 Oct 2024 10:21:55 +1000 Subject: [PATCH] Move some `use` declarations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So they're all in the one place. Also prepend with `crate::`, à la the `unqualified_local_imports` lint. --- compiler/rustc_borrowck/src/lib.rs | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 976674eb822..2ef3e108bdb 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -20,7 +20,6 @@ use std::collections::BTreeMap; use std::marker::PhantomData; use std::ops::Deref; -use consumers::{BodyWithBorrowckFacts, ConsumerOptions}; use rustc_abi::FieldIdx; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_data_structures::graph::dominators::Dominators; @@ -49,10 +48,18 @@ use rustc_span::{Span, Symbol}; use smallvec::SmallVec; use tracing::{debug, instrument}; -use self::diagnostics::{AccessKind, IllegalMoveOriginKind, MoveError, RegionName}; -use self::location::LocationTable; -use self::path_utils::*; -use self::prefixes::PrefixSet; +use crate::borrow_set::{BorrowData, BorrowSet}; +use crate::consumers::{BodyWithBorrowckFacts, ConsumerOptions}; +use crate::dataflow::{BorrowIndex, BorrowckDomain, BorrowckResults, Borrows}; +use crate::diagnostics::{AccessKind, IllegalMoveOriginKind, MoveError, RegionName}; +use crate::location::LocationTable; +use crate::nll::PoloniusOutput; +use crate::path_utils::*; +use crate::place_ext::PlaceExt; +use crate::places_conflict::{PlaceConflictBias, places_conflict}; +use crate::prefixes::PrefixSet; +use crate::region_infer::RegionInferenceContext; +use crate::renumber::RegionCtxt; use crate::session_diagnostics::VarNeedNotMut; mod borrow_set; @@ -81,14 +88,6 @@ mod util; /// A public API provided for the Rust compiler consumers. pub mod consumers; -use borrow_set::{BorrowData, BorrowSet}; -use dataflow::{BorrowIndex, BorrowckDomain, BorrowckResults, Borrows}; -use nll::PoloniusOutput; -use place_ext::PlaceExt; -use places_conflict::{PlaceConflictBias, places_conflict}; -use region_infer::RegionInferenceContext; -use renumber::RegionCtxt; - rustc_fluent_macro::fluent_messages! { "../messages.ftl" } /// Associate some local constants with the `'tcx` lifetime