File tree Expand file tree Collapse file tree
compiler/rustc_infer/src/infer/outlives Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -450,6 +450,17 @@ where
450450}
451451
452452pub trait OutlivesHandlingDelegate < ' tcx > {
453+ /// Subtle: this trait exists to abstract the outlives handling between
454+ /// regular regionck and NLL. Unfortunately, NLL and regionck don't agree
455+ /// on how subtyping works.
456+ ///
457+ /// In NLL `'a sub 'b` means `'a outlives 'b`.
458+ /// In regionck `'a sub 'b` means the set of locations `'a` is live at is a subset
459+ /// of the locations that `'b` is, or in other words, `'b outlives 'a`.
460+ ///
461+ /// This method will be called with the regionck meaning of subtyping. i.e. if
462+ /// there is some `&'b u32: 'static` constraint, we will give a `'b sub 'static`
463+ /// constraint.
453464 fn push_sub_region_constraint (
454465 & mut self ,
455466 origin : SubregionOrigin < ' tcx > ,
You can’t perform that action at this time.
0 commit comments