Skip to content

Commit d4a0f21

Browse files
authored
Rollup merge of #147199 - jdonszelmann:outdated-comment-infctx, r=lcnr
remove outdated comment in (inner) `InferCtxt` This comment seems to have stopped being relevant around 3 years ago after 9f95c60. A map? what map? :P r? `@lcnr`
2 parents 62b72bd + bdebd47 commit d4a0f21

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -131,23 +131,6 @@ pub struct InferCtxtInner<'tcx> {
131131
/// `$0: 'static`. This will get checked later by regionck. (We
132132
/// can't generally check these things right away because we have
133133
/// to wait until types are resolved.)
134-
///
135-
/// These are stored in a map keyed to the id of the innermost
136-
/// enclosing fn body / static initializer expression. This is
137-
/// because the location where the obligation was incurred can be
138-
/// relevant with respect to which sublifetime assumptions are in
139-
/// place. The reason that we store under the fn-id, and not
140-
/// something more fine-grained, is so that it is easier for
141-
/// regionck to be sure that it has found *all* the region
142-
/// obligations (otherwise, it's easy to fail to walk to a
143-
/// particular node-id).
144-
///
145-
/// Before running `resolve_regions_and_report_errors`, the creator
146-
/// of the inference context is expected to invoke
147-
/// [`InferCtxt::process_registered_region_obligations`]
148-
/// for each body-id in this map, which will process the
149-
/// obligations within. This is expected to be done 'late enough'
150-
/// that all type inference variables have been bound and so forth.
151134
region_obligations: Vec<TypeOutlivesConstraint<'tcx>>,
152135

153136
/// The outlives bounds that we assume must hold about placeholders that

compiler/rustc_trait_selection/src/regions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ impl<'tcx> InferCtxt<'tcx> {
7777
///
7878
/// Prefer this method over `resolve_regions_with_normalize`, unless you are
7979
/// doing something specific for normalization.
80+
///
81+
/// This function assumes that all infer variables are already constrained.
8082
fn resolve_regions(
8183
&self,
8284
body_id: LocalDefId,

0 commit comments

Comments
 (0)