diff options
| author | b-naber <bn263@gmx.de> | 2022-11-09 21:58:04 +0100 |
|---|---|---|
| committer | b-naber <b_naber@gmx.de> | 2023-02-19 22:12:12 +0000 |
| commit | 46bd77aa808ad270a4bda28104b5f9a1b42ea159 (patch) | |
| tree | b7446de6c6f9ce175dbc92cf4e23c66a0fb626ab /compiler/rustc_borrowck | |
| parent | e2bf960fe1c011e75cf0d6a06d3f955444d11043 (diff) | |
| download | rust-46bd77aa808ad270a4bda28104b5f9a1b42ea159.tar.gz rust-46bd77aa808ad270a4bda28104b5f9a1b42ea159.zip | |
some conditional imports
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/nll.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/renumber.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/relate_tys.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/universal_regions.rs | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 70f6a323e88..4a5abb05149 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -97,6 +97,7 @@ use nll::{PoloniusOutput, ToRegionVid}; use place_ext::PlaceExt; use places_conflict::{places_conflict, PlaceConflictBias}; use region_infer::RegionInferenceContext; +#[cfg(debug_assertions)] use renumber::RegionCtxt; // FIXME(eddyb) perhaps move this somewhere more centrally. diff --git a/compiler/rustc_borrowck/src/nll.rs b/compiler/rustc_borrowck/src/nll.rs index 28d49c19c75..e5dbb83dd07 100644 --- a/compiler/rustc_borrowck/src/nll.rs +++ b/compiler/rustc_borrowck/src/nll.rs @@ -257,11 +257,6 @@ pub(crate) fn compute_regions<'cx, 'tcx>( borrow_set, ); - if cfg!(debug_assertions) { - let var_to_origin = infcx.reg_var_to_origin.borrow(); - debug!("var_to_origin: {:#?}", var_to_origin); - } - let mut regioncx = RegionInferenceContext::new( infcx, var_origins, diff --git a/compiler/rustc_borrowck/src/renumber.rs b/compiler/rustc_borrowck/src/renumber.rs index eeba0e3c2bc..cf0b944a4c5 100644 --- a/compiler/rustc_borrowck/src/renumber.rs +++ b/compiler/rustc_borrowck/src/renumber.rs @@ -8,6 +8,7 @@ use rustc_middle::mir::Constant; use rustc_middle::mir::{Body, Location, Promoted}; use rustc_middle::ty::subst::SubstsRef; use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable}; +#[cfg(debug_assertions)] use rustc_span::Symbol; /// Replaces all free regions appearing in the MIR with fresh diff --git a/compiler/rustc_borrowck/src/type_check/relate_tys.rs b/compiler/rustc_borrowck/src/type_check/relate_tys.rs index 91b26fc4e53..bb05349b2e9 100644 --- a/compiler/rustc_borrowck/src/type_check/relate_tys.rs +++ b/compiler/rustc_borrowck/src/type_check/relate_tys.rs @@ -9,6 +9,7 @@ use rustc_trait_selection::traits::query::Fallible; use crate::constraints::OutlivesConstraint; use crate::diagnostics::UniverseInfo; +#[cfg(debug_assertions)] use crate::renumber::RegionCtxt; use crate::type_check::{InstantiateOpaqueType, Locations, TypeChecker}; diff --git a/compiler/rustc_borrowck/src/universal_regions.rs b/compiler/rustc_borrowck/src/universal_regions.rs index 919c772a203..e22b9de6fc1 100644 --- a/compiler/rustc_borrowck/src/universal_regions.rs +++ b/compiler/rustc_borrowck/src/universal_regions.rs @@ -26,10 +26,12 @@ use rustc_middle::ty::{ self, DefIdTree, InlineConstSubsts, InlineConstSubstsParts, RegionVid, Ty, TyCtxt, }; use rustc_middle::ty::{InternalSubsts, SubstsRef}; +#[cfg(debug_assertions)] use rustc_span::Symbol; use std::iter; use crate::nll::ToRegionVid; +#[cfg(debug_assertions)] use crate::renumber::RegionCtxt; use crate::BorrowckInferCtxt; |
