remove cfg attributes
This commit is contained in:
parent
0725d0ceee
commit
c9843d6144
3 changed files with 6 additions and 12 deletions
|
@ -244,7 +244,6 @@ pub enum ExtraConstraintInfo {
|
|||
PlaceholderFromPredicate(Span),
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[instrument(skip(infcx, sccs), level = "debug")]
|
||||
fn sccs_info<'cx, 'tcx>(
|
||||
infcx: &'cx BorrowckInferCtxt<'cx, 'tcx>,
|
||||
|
@ -271,10 +270,10 @@ fn sccs_info<'cx, 'tcx>(
|
|||
components[scc_idx.as_usize()].insert((reg_var, *origin));
|
||||
}
|
||||
|
||||
let mut components_str = "strongly connected components:";
|
||||
let mut components_str = "strongly connected components:".to_string();
|
||||
for (scc_idx, reg_vars_origins) in components.iter().enumerate() {
|
||||
let regions_info = reg_vars_origins.clone().into_iter().collect::<Vec<_>>();
|
||||
components_str.push(&format(
|
||||
components_str.push_str(&format!(
|
||||
"{:?}: {:?})",
|
||||
ConstraintSccIndex::from_usize(scc_idx),
|
||||
regions_info,
|
||||
|
@ -346,8 +345,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
|||
let fr_static = universal_regions.fr_static;
|
||||
let constraint_sccs = Rc::new(constraints.compute_sccs(&constraint_graph, fr_static));
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
if cfg!(debug_assertions) {
|
||||
sccs_info(_infcx, constraint_sccs.clone());
|
||||
}
|
||||
|
||||
let mut scc_values =
|
||||
RegionValues::new(elements, universal_regions.len(), &placeholder_indices);
|
||||
|
|
|
@ -62,14 +62,12 @@ pub(crate) enum RegionCtxt {
|
|||
LateBound(BoundRegionInfo),
|
||||
Existential(Option<Symbol>),
|
||||
Placeholder(BoundRegionInfo),
|
||||
#[cfg(debug_assertions)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
impl RegionCtxt {
|
||||
/// Used to determine the representative of a component in the strongly connected
|
||||
/// constraint graph
|
||||
#[cfg(debug_assertions)]
|
||||
pub(crate) fn preference_value(self) -> usize {
|
||||
let _anon = Symbol::intern("anon");
|
||||
|
||||
|
|
|
@ -318,11 +318,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
|
||||
// Screen out `'a: 'a` cases.
|
||||
let ty::OutlivesPredicate(k1, r2) = r_c.0;
|
||||
if k1 != r2.into() {
|
||||
Some(r_c)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if k1 != r2.into() { Some(r_c) } else { None }
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue