2
2
3
3
use crate :: middle:: codegen_fn_attrs:: CodegenFnAttrFlags ;
4
4
use crate :: ty:: layout:: IntegerExt ;
5
- use crate :: ty:: query:: TyCtxtAt ;
6
5
use crate :: ty:: {
7
6
self , DefIdTree , FallibleTypeFolder , Ty , TyCtxt , TypeFoldable , TypeFolder , TypeSuperFoldable ,
8
7
TypeVisitable ,
@@ -821,12 +820,8 @@ impl<'tcx> Ty<'tcx> {
821
820
/// does copies even when the type actually doesn't satisfy the
822
821
/// full requirements for the `Copy` trait (cc #29149) -- this
823
822
/// winds up being reported as an error during NLL borrow check.
824
- pub fn is_copy_modulo_regions (
825
- self ,
826
- tcx_at : TyCtxtAt < ' tcx > ,
827
- param_env : ty:: ParamEnv < ' tcx > ,
828
- ) -> bool {
829
- self . is_trivially_pure_clone_copy ( ) || tcx_at. is_copy_raw ( param_env. and ( self ) )
823
+ pub fn is_copy_modulo_regions ( self , tcx : TyCtxt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
824
+ self . is_trivially_pure_clone_copy ( ) || tcx. is_copy_raw ( param_env. and ( self ) )
830
825
}
831
826
832
827
/// Checks whether values of this type `T` have a size known at
@@ -835,8 +830,8 @@ impl<'tcx> Ty<'tcx> {
835
830
/// over-approximation in generic contexts, where one can have
836
831
/// strange rules like `<T as Foo<'static>>::Bar: Sized` that
837
832
/// actually carry lifetime requirements.
838
- pub fn is_sized ( self , tcx_at : TyCtxtAt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
839
- self . is_trivially_sized ( tcx_at . tcx ) || tcx_at . is_sized_raw ( param_env. and ( self ) )
833
+ pub fn is_sized ( self , tcx : TyCtxt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
834
+ self . is_trivially_sized ( tcx) || tcx . is_sized_raw ( param_env. and ( self ) )
840
835
}
841
836
842
837
/// Checks whether values of this type `T` implement the `Freeze`
@@ -846,8 +841,8 @@ impl<'tcx> Ty<'tcx> {
846
841
/// optimization as well as the rules around static values. Note
847
842
/// that the `Freeze` trait is not exposed to end users and is
848
843
/// effectively an implementation detail.
849
- pub fn is_freeze ( self , tcx_at : TyCtxtAt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
850
- self . is_trivially_freeze ( ) || tcx_at . is_freeze_raw ( param_env. and ( self ) )
844
+ pub fn is_freeze ( self , tcx : TyCtxt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
845
+ self . is_trivially_freeze ( ) || tcx . is_freeze_raw ( param_env. and ( self ) )
851
846
}
852
847
853
848
/// Fast path helper for testing if a type is `Freeze`.
@@ -886,8 +881,8 @@ impl<'tcx> Ty<'tcx> {
886
881
}
887
882
888
883
/// Checks whether values of this type `T` implement the `Unpin` trait.
889
- pub fn is_unpin ( self , tcx_at : TyCtxtAt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
890
- self . is_trivially_unpin ( ) || tcx_at . is_unpin_raw ( param_env. and ( self ) )
884
+ pub fn is_unpin ( self , tcx : TyCtxt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
885
+ self . is_trivially_unpin ( ) || tcx . is_unpin_raw ( param_env. and ( self ) )
891
886
}
892
887
893
888
/// Fast path helper for testing if a type is `Unpin`.
0 commit comments