1
Fork 0

update comments

This commit is contained in:
lcnr 2022-04-01 12:08:57 +02:00
parent 0677edc86e
commit 18fae7b2e5
3 changed files with 6 additions and 7 deletions

View file

@ -49,7 +49,6 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
/// At the end of processing, the substitution S (once /// At the end of processing, the substitution S (once
/// canonicalized) then represents the values that you computed /// canonicalized) then represents the values that you computed
/// for each of the canonical inputs to your query. /// for each of the canonical inputs to your query.
pub fn instantiate_canonical_with_fresh_inference_vars<T>( pub fn instantiate_canonical_with_fresh_inference_vars<T>(
&self, &self,
span: Span, span: Span,

View file

@ -558,9 +558,9 @@ impl<'tcx> fmt::Display for FixupError<'tcx> {
} }
} }
/// Helper type of a temporary returned by `tcx.infer_ctxt()`. /// A temporary returned by `tcx.infer_ctxt()`. This is necessary
/// Necessary because we can't write the following bound: /// for multiple `InferCtxt` to share the same `in_progress_typeck_results`
/// `F: for<'b, 'tcx> where 'tcx FnOnce(InferCtxt<'b, 'tcx>)`. /// without using `Rc` or something similar.
pub struct InferCtxtBuilder<'tcx> { pub struct InferCtxtBuilder<'tcx> {
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,
fresh_typeck_results: Option<RefCell<ty::TypeckResults<'tcx>>>, fresh_typeck_results: Option<RefCell<ty::TypeckResults<'tcx>>>,

View file

@ -68,9 +68,9 @@ impl<'a, 'tcx> Deref for Inherited<'a, 'tcx> {
} }
} }
/// Helper type of a temporary returned by `Inherited::build(...)`. /// A temporary returned by `Inherited::build(...)`. This is necessary
/// Necessary because we can't write the following bound: /// for multiple `InferCtxt` to share the same `in_progress_typeck_results`
/// `F: for<'b, 'tcx> where 'tcx FnOnce(Inherited<'b, 'tcx>)`. /// without using `Rc` or something similar.
pub struct InheritedBuilder<'tcx> { pub struct InheritedBuilder<'tcx> {
infcx: infer::InferCtxtBuilder<'tcx>, infcx: infer::InferCtxtBuilder<'tcx>,
def_id: LocalDefId, def_id: LocalDefId,