From 0037cca2f79c63143e3849ec84eebdaf4b451712 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 9 Feb 2018 10:43:36 -0500 Subject: [PATCH] comment the purpose of `TransNormalize` --- src/librustc/infer/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs index d952e430f61..713cf560851 100644 --- a/src/librustc/infer/mod.rs +++ b/src/librustc/infer/mod.rs @@ -487,6 +487,10 @@ pub struct CombinedSnapshot<'a, 'tcx:'a> { /// Helper trait for shortening the lifetimes inside a /// value for post-type-checking normalization. +/// +/// This trait offers a normalization method where the inputs and +/// outputs both have the `'gcx` lifetime; the implementations +/// internally create inference contexts and/or lift as needed. pub trait TransNormalize<'gcx>: TypeFoldable<'gcx> { fn trans_normalize<'a, 'tcx>(&self, infcx: &InferCtxt<'a, 'gcx, 'tcx>,