@@ -10,7 +10,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
10
10
use rustc_errors:: struct_span_err;
11
11
use rustc_hir as hir;
12
12
use rustc_hir:: def_id:: { DefId , LocalDefId } ;
13
- use rustc_hir:: lang_items:: { CoerceUnsizedTraitLangItem , CopyTraitLangItem , SizedTraitLangItem } ;
13
+ use rustc_hir:: lang_items:: LangItem ;
14
14
use rustc_index:: vec:: { Idx , IndexVec } ;
15
15
use rustc_infer:: infer:: canonical:: QueryRegionConstraints ;
16
16
use rustc_infer:: infer:: outlives:: env:: RegionBoundPairs ;
@@ -507,7 +507,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
507
507
if let PlaceContext :: NonMutatingUse ( NonMutatingUseContext :: Copy ) = context {
508
508
let tcx = self . tcx ( ) ;
509
509
let trait_ref = ty:: TraitRef {
510
- def_id : tcx. require_lang_item ( CopyTraitLangItem , Some ( self . last_span ) ) ,
510
+ def_id : tcx. require_lang_item ( LangItem :: Copy , Some ( self . last_span ) ) ,
511
511
substs : tcx. mk_substs_trait ( place_ty. ty , & [ ] ) ,
512
512
} ;
513
513
@@ -1474,7 +1474,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1474
1474
self . check_rvalue ( body, rv, location) ;
1475
1475
if !self . tcx ( ) . features ( ) . unsized_locals {
1476
1476
let trait_ref = ty:: TraitRef {
1477
- def_id : tcx. require_lang_item ( SizedTraitLangItem , Some ( self . last_span ) ) ,
1477
+ def_id : tcx. require_lang_item ( LangItem :: Sized , Some ( self . last_span ) ) ,
1478
1478
substs : tcx. mk_substs_trait ( place_ty, & [ ] ) ,
1479
1479
} ;
1480
1480
self . prove_trait_ref (
@@ -2025,7 +2025,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2025
2025
self . param_env ,
2026
2026
ty:: Binder :: bind ( ty:: TraitRef :: new (
2027
2027
self . tcx ( ) . require_lang_item (
2028
- CopyTraitLangItem ,
2028
+ LangItem :: Copy ,
2029
2029
Some ( self . last_span ) ,
2030
2030
) ,
2031
2031
tcx. mk_substs_trait ( ty, & [ ] ) ,
@@ -2050,7 +2050,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2050
2050
}
2051
2051
2052
2052
let trait_ref = ty:: TraitRef {
2053
- def_id : tcx. require_lang_item ( SizedTraitLangItem , Some ( self . last_span ) ) ,
2053
+ def_id : tcx. require_lang_item ( LangItem :: Sized , Some ( self . last_span ) ) ,
2054
2054
substs : tcx. mk_substs_trait ( ty, & [ ] ) ,
2055
2055
} ;
2056
2056
@@ -2148,10 +2148,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2148
2148
CastKind :: Pointer ( PointerCast :: Unsize ) => {
2149
2149
let & ty = ty;
2150
2150
let trait_ref = ty:: TraitRef {
2151
- def_id : tcx. require_lang_item (
2152
- CoerceUnsizedTraitLangItem ,
2153
- Some ( self . last_span ) ,
2154
- ) ,
2151
+ def_id : tcx
2152
+ . require_lang_item ( LangItem :: CoerceUnsized , Some ( self . last_span ) ) ,
2155
2153
substs : tcx. mk_substs_trait ( op. ty ( body, tcx) , & [ ty. into ( ) ] ) ,
2156
2154
} ;
2157
2155
0 commit comments