Skip to content

Commit 85fe5a0

Browse files
committed
Mark sccs_info as noinline.
1 parent ce8a9c9 commit 85fe5a0

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+3
-2
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,10 @@ pub enum ExtraConstraintInfo {
246246
}
247247

248248
#[instrument(skip(infcx, sccs), level = "debug")]
249+
#[inline(never)] // This is a debugging tool, we need to discard it from profiles.
249250
fn sccs_info<'cx, 'tcx>(
250251
infcx: &'cx BorrowckInferCtxt<'cx, 'tcx>,
251-
sccs: Rc<Sccs<RegionVid, ConstraintSccIndex>>,
252+
sccs: &Sccs<RegionVid, ConstraintSccIndex>,
252253
) {
253254
use crate::renumber::RegionCtxt;
254255

@@ -348,7 +349,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
348349
let constraint_sccs = Rc::new(constraints.compute_sccs(&constraint_graph, fr_static));
349350

350351
if cfg!(debug_assertions) {
351-
sccs_info(_infcx, constraint_sccs.clone());
352+
sccs_info(_infcx, &*constraint_sccs);
352353
}
353354

354355
let mut scc_values =

0 commit comments

Comments
 (0)