Skip to content

Commit

Permalink
Document with_opaque_type_inference's use cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Aug 6, 2021
1 parent 1b9ad13 commit 238d974
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ impl<'tcx> InferCtxtBuilder<'tcx> {

/// Whenever the `InferCtxt` should be able to handle defining uses of opaque types,
/// you need to call this function. Otherwise the opaque type will be treated opaquely.
///
/// It is only meant to be called in two places, for typeck
/// (via `with_fresh_in_progress_typeck_results`) and for the inference context used
/// in mir borrowck.
pub fn with_opaque_type_inference(mut self, defining_use_anchor: LocalDefId) -> Self {
self.defining_use_anchor = defining_use_anchor;
self
Expand Down

0 comments on commit 238d974

Please sign in to comment.