]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/util.rs
rename `ParameterEnvironment` to `ParamEnv`
[rust.git] / src / librustc / ty / util.rs
index 0c2f4efccd53102b7fe615d1571ed6c9ab535f5a..d18b0a69ade22631e8c43c6e5406b6e78df223d7 100644 (file)
@@ -16,7 +16,7 @@
 use ich::{StableHashingContext, NodeIdHashingMode};
 use traits::{self, Reveal};
 use ty::{self, Ty, TyCtxt, TypeFoldable};
-use ty::ParameterEnvironment;
+use ty::ParamEnv;
 use ty::fold::TypeVisitor;
 use ty::layout::{Layout, LayoutError};
 use ty::subst::{Subst, Kind};
@@ -148,7 +148,7 @@ pub enum Representability {
     SelfRecursive(Vec<Span>),
 }
 
-impl<'tcx> ParameterEnvironment<'tcx> {
+impl<'tcx> ParamEnv<'tcx> {
     /// Construct a trait environment suitable for contexts where
     /// there are no where clauses in scope.
     pub fn empty() -> Self {
@@ -157,7 +157,7 @@ pub fn empty() -> Self {
 
     /// Construct a trait environment with the given set of predicates.
     pub fn new(caller_bounds: &'tcx ty::Slice<ty::Predicate<'tcx>>) -> Self {
-        ty::ParameterEnvironment { caller_bounds }
+        ty::ParamEnv { caller_bounds }
     }
 
     pub fn can_type_implement_copy<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>,
@@ -720,7 +720,7 @@ fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, x: &ty::Binder<T>) -> bool {
 impl<'a, 'tcx> ty::TyS<'tcx> {
     pub fn moves_by_default(&'tcx self,
                             tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                            param_env: ParameterEnvironment<'tcx>,
+                            param_env: ParamEnv<'tcx>,
                             span: Span)
                             -> bool {
         !tcx.at(span).is_copy_raw(param_env.and(self))
@@ -728,7 +728,7 @@ pub fn moves_by_default(&'tcx self,
 
     pub fn is_sized(&'tcx self,
                     tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                    param_env: ParameterEnvironment<'tcx>,
+                    param_env: ParamEnv<'tcx>,
                     span: Span)-> bool
     {
         tcx.at(span).is_sized_raw(param_env.and(self))
@@ -736,7 +736,7 @@ pub fn is_sized(&'tcx self,
 
     pub fn is_freeze(&'tcx self,
                      tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                     param_env: ParameterEnvironment<'tcx>,
+                     param_env: ParamEnv<'tcx>,
                      span: Span)-> bool
     {
         tcx.at(span).is_freeze_raw(param_env.and(self))
@@ -751,7 +751,7 @@ pub fn is_freeze(&'tcx self,
     #[inline]
     pub fn needs_drop(&'tcx self,
                       tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                      param_env: ty::ParameterEnvironment<'tcx>)
+                      param_env: ty::ParamEnv<'tcx>)
                       -> bool {
         tcx.needs_drop_raw(param_env.and(self))
     }
@@ -942,7 +942,7 @@ fn is_type_structurally_recursive<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 }
 
 fn is_copy_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                         query: ty::ParameterEnvironmentAnd<'tcx, Ty<'tcx>>)
+                         query: ty::ParamEnvAnd<'tcx, Ty<'tcx>>)
                          -> bool
 {
     let (param_env, ty) = query.into_parts();
@@ -952,7 +952,7 @@ fn is_copy_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 }
 
 fn is_sized_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                          query: ty::ParameterEnvironmentAnd<'tcx, Ty<'tcx>>)
+                          query: ty::ParamEnvAnd<'tcx, Ty<'tcx>>)
                           -> bool
 {
     let (param_env, ty) = query.into_parts();
@@ -962,7 +962,7 @@ fn is_sized_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 }
 
 fn is_freeze_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                           query: ty::ParameterEnvironmentAnd<'tcx, Ty<'tcx>>)
+                           query: ty::ParamEnvAnd<'tcx, Ty<'tcx>>)
                            -> bool
 {
     let (param_env, ty) = query.into_parts();
@@ -972,7 +972,7 @@ fn is_freeze_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 }
 
 fn needs_drop_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                            query: ty::ParameterEnvironmentAnd<'tcx, Ty<'tcx>>)
+                            query: ty::ParamEnvAnd<'tcx, Ty<'tcx>>)
                             -> bool
 {
     let (param_env, ty) = query.into_parts();
@@ -1018,7 +1018,7 @@ fn needs_drop_raw<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         ty::TyAdt(def, _) if def.has_dtor(tcx) => true,
 
         // Can refer to a type which may drop.
-        // FIXME(eddyb) check this against a ParameterEnvironment.
+        // FIXME(eddyb) check this against a ParamEnv.
         ty::TyDynamic(..) | ty::TyProjection(..) | ty::TyParam(_) |
         ty::TyAnon(..) | ty::TyInfer(_) | ty::TyError => true,