@@ -539,7 +539,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
539
539
if let PlaceContext :: NonMutatingUse ( NonMutatingUseContext :: Copy ) = context {
540
540
let tcx = self . tcx ( ) ;
541
541
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 ] ) ;
543
543
544
544
// To have a `Copy` operand, the type `T` of the
545
545
// value must be `Copy`. Note that we prove that `T: Copy`,
@@ -1239,8 +1239,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1239
1239
self . check_rvalue ( body, rv, location) ;
1240
1240
if !self . unsized_feature_enabled ( ) {
1241
1241
let trait_ref = ty:: TraitRef :: from_lang_item (
1242
- tcx. at ( self . last_span ) ,
1242
+ tcx,
1243
1243
LangItem :: Sized ,
1244
+ self . last_span ,
1244
1245
[ place_ty] ,
1245
1246
) ;
1246
1247
self . prove_trait_ref (
@@ -1815,7 +1816,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1815
1816
// Make sure that repeated elements implement `Copy`.
1816
1817
let ty = place. ty ( body, tcx) . ty ;
1817
1818
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] ) ;
1819
1820
1820
1821
self . prove_trait_ref (
1821
1822
trait_ref,
@@ -1828,7 +1829,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1828
1829
}
1829
1830
1830
1831
& 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] ) ;
1832
1833
1833
1834
self . prove_trait_ref (
1834
1835
trait_ref,
@@ -1840,7 +1841,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1840
1841
Rvalue :: ShallowInitBox ( operand, ty) => {
1841
1842
self . check_operand ( operand, location) ;
1842
1843
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] ) ;
1844
1845
1845
1846
self . prove_trait_ref (
1846
1847
trait_ref,
@@ -1938,8 +1939,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1938
1939
CastKind :: Pointer ( PointerCast :: Unsize ) => {
1939
1940
let & ty = ty;
1940
1941
let trait_ref = ty:: TraitRef :: from_lang_item (
1941
- tcx. at ( span ) ,
1942
+ tcx,
1942
1943
LangItem :: CoerceUnsized ,
1944
+ span,
1943
1945
[ op. ty ( body, tcx) , ty] ,
1944
1946
) ;
1945
1947
0 commit comments