@@ -539,7 +539,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
539539 if let PlaceContext :: NonMutatingUse ( NonMutatingUseContext :: Copy ) = context {
540540 let tcx = self . tcx ( ) ;
541541 let trait_ref =
542- ty:: TraitRef :: from_lang_item ( tcx. at ( self . last_span ) , LangItem :: Copy , [ place_ty. ty ] ) ;
542+ ty:: TraitRef :: from_lang_item ( tcx, LangItem :: Copy , self . last_span , [ place_ty. ty ] ) ;
543543
544544 // To have a `Copy` operand, the type `T` of the
545545 // value must be `Copy`. Note that we prove that `T: Copy`,
@@ -1239,8 +1239,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
12391239 self . check_rvalue ( body, rv, location) ;
12401240 if !self . unsized_feature_enabled ( ) {
12411241 let trait_ref = ty:: TraitRef :: from_lang_item (
1242- tcx. at ( self . last_span ) ,
1242+ tcx,
12431243 LangItem :: Sized ,
1244+ self . last_span ,
12441245 [ place_ty] ,
12451246 ) ;
12461247 self . prove_trait_ref (
@@ -1815,7 +1816,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
18151816 // Make sure that repeated elements implement `Copy`.
18161817 let ty = place. ty ( body, tcx) . ty ;
18171818 let trait_ref =
1818- ty:: TraitRef :: from_lang_item ( tcx. at ( span ) , LangItem :: Copy , [ ty] ) ;
1819+ ty:: TraitRef :: from_lang_item ( tcx, LangItem :: Copy , span , [ ty] ) ;
18191820
18201821 self . prove_trait_ref (
18211822 trait_ref,
@@ -1828,7 +1829,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
18281829 }
18291830
18301831 & Rvalue :: NullaryOp ( NullOp :: SizeOf | NullOp :: AlignOf , ty) => {
1831- let trait_ref = ty:: TraitRef :: from_lang_item ( tcx. at ( span ) , LangItem :: Sized , [ ty] ) ;
1832+ let trait_ref = ty:: TraitRef :: from_lang_item ( tcx, LangItem :: Sized , span , [ ty] ) ;
18321833
18331834 self . prove_trait_ref (
18341835 trait_ref,
@@ -1840,7 +1841,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
18401841 Rvalue :: ShallowInitBox ( operand, ty) => {
18411842 self . check_operand ( operand, location) ;
18421843
1843- let trait_ref = ty:: TraitRef :: from_lang_item ( tcx. at ( span ) , LangItem :: Sized , [ * ty] ) ;
1844+ let trait_ref = ty:: TraitRef :: from_lang_item ( tcx, LangItem :: Sized , span , [ * ty] ) ;
18441845
18451846 self . prove_trait_ref (
18461847 trait_ref,
@@ -1938,8 +1939,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
19381939 CastKind :: Pointer ( PointerCast :: Unsize ) => {
19391940 let & ty = ty;
19401941 let trait_ref = ty:: TraitRef :: from_lang_item (
1941- tcx. at ( span ) ,
1942+ tcx,
19421943 LangItem :: CoerceUnsized ,
1944+ span,
19431945 [ op. ty ( body, tcx) , ty] ,
19441946 ) ;
19451947
0 commit comments