Struct rustc_trans::middle::ty::ParameterEnvironmentUnstable
[-] [+]
[src]
pub struct ParameterEnvironment<'a, 'tcx> where 'tcx: 'a {
pub tcx: &'a ctxt<'tcx>,
pub free_substs: Substs<'tcx>,
pub implicit_region_bound: Region,
pub caller_bounds: Vec<Predicate<'tcx>>,
pub selection_cache: SelectionCache<'tcx>,
}
When type checking, we use the ParameterEnvironment
to track
details about the type/lifetime parameters that are in scope.
It primarily stores the bounds information.
Note: This information might seem to be redundant with the data in
tcx.ty_param_defs
, but it is not. That table contains the
parameter definitions from an "outside" perspective, but this
struct will contain the bounds for a parameter as seen from inside
the function body. Currently the only real distinction is that
bound lifetime parameters are replaced with free ones, but in the
future I hope to refine the representation of types so as to make
more distinctions clearer.