Skip to content

Commit 30d6b5e

Browse files
Rollup merge of #164317 - Lysxia:ree-region, r=lqd
Re-export RegionInferenceContext This export was made private in https://github.com/rust-lang/rust/pull/163225/changes#diff-637a488a4cb8b83e26c2dd558341aa8ca9feb6b72855e919d1d9ece547f23387R19 This is already used by Creusot, a third-party rustc driver, so I propose to reexport it. It seems odd to hide this type when it appears as argument and field types in other exported entities of `consumers`. I'm just shooting in the dark here; I'm open to figure out alternative solutions if making that type private was intentional.
2 parents 36732a8 + 3a55067 commit 30d6b5e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎compiler/rustc_borrowck/src/consumers.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub use super::polonius::legacy::{
1616
PoloniusFacts as PoloniusInput, PoloniusLocationTable, PoloniusOutput, PoloniusRegionVid,
1717
RichLocation, RustcFacts,
1818
};
19-
use super::region_infer::RegionInferenceContext;
19+
pub use super::region_infer::RegionInferenceContext;
2020
use crate::BorrowCheckRootCtxt;
2121

2222
/// Struct used during mir borrowck to collect bodies with facts for a typeck root and all

‎compiler/rustc_borrowck/src/region_infer/mod.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::fmt;
22

3-
pub(crate) use region_context::*;
3+
// To be reexported in `super::consumers`
4+
pub use region_context::RegionInferenceContext;
45
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
56
use rustc_data_structures::graph::scc::Sccs;
67
use rustc_hir::def_id::CRATE_DEF_ID;
@@ -261,7 +262,7 @@ fn sccs_info<'tcx>(infcx: &BorrowckInferCtxt<'tcx>, sccs: &ConstraintSccs) {
261262

262263
#[derive(Clone, Debug)]
263264
pub(crate) struct BestBlame<'tcx> {
264-
/// See docs on [`RegionInferenceContextInner::best_blame_constraint`] for what this is.
265+
/// See docs on [`region_context::RegionInferenceContextInner::best_blame_constraint`] for what this is.
265266
path: Vec<OutlivesConstraint<'tcx>>,
266267
/// Index into `path` of the constraint most relevant to report to users.
267268
idx: usize,

0 commit comments

Comments
 (0)