@@ -199,7 +199,7 @@ fn orphan_check_trait_ref<'tcx>(tcx: TyCtxt,
199199
200200fn uncovered_tys < ' tcx > ( tcx : TyCtxt , ty : Ty < ' tcx > , infer_is_local : InferIsLocal )
201201 -> Vec < Ty < ' tcx > > {
202- if ty_is_local_constructor ( tcx , ty, infer_is_local) {
202+ if ty_is_local_constructor ( ty, infer_is_local) {
203203 vec ! [ ]
204204 } else if fundamental_ty ( tcx, ty) {
205205 ty. walk_shallow ( )
@@ -219,13 +219,13 @@ fn is_type_parameter(ty: Ty) -> bool {
219219}
220220
221221fn ty_is_local ( tcx : TyCtxt , ty : Ty , infer_is_local : InferIsLocal ) -> bool {
222- ty_is_local_constructor ( tcx , ty, infer_is_local) ||
222+ ty_is_local_constructor ( ty, infer_is_local) ||
223223 fundamental_ty ( tcx, ty) && ty. walk_shallow ( ) . any ( |t| ty_is_local ( tcx, t, infer_is_local) )
224224}
225225
226226fn fundamental_ty ( tcx : TyCtxt , ty : Ty ) -> bool {
227227 match ty. sty {
228- ty:: TyBox ( .. ) | ty :: TyRef ( ..) => true ,
228+ ty:: TyRef ( ..) => true ,
229229 ty:: TyAdt ( def, _) => def. is_fundamental ( ) ,
230230 ty:: TyDynamic ( ref data, ..) => {
231231 data. principal ( ) . map_or ( false , |p| tcx. has_attr ( p. def_id ( ) , "fundamental" ) )
@@ -234,7 +234,7 @@ fn fundamental_ty(tcx: TyCtxt, ty: Ty) -> bool {
234234 }
235235}
236236
237- fn ty_is_local_constructor ( tcx : TyCtxt , ty : Ty , infer_is_local : InferIsLocal ) -> bool {
237+ fn ty_is_local_constructor ( ty : Ty , infer_is_local : InferIsLocal ) -> bool {
238238 debug ! ( "ty_is_local_constructor({:?})" , ty) ;
239239
240240 match ty. sty {
@@ -265,11 +265,6 @@ fn ty_is_local_constructor(tcx: TyCtxt, ty: Ty, infer_is_local: InferIsLocal)->
265265 def. did . is_local ( )
266266 }
267267
268- ty:: TyBox ( _) => { // Box<T>
269- let krate = tcx. lang_items . owned_box ( ) . map ( |d| d. krate ) ;
270- krate == Some ( LOCAL_CRATE )
271- }
272-
273268 ty:: TyDynamic ( ref tt, ..) => {
274269 tt. principal ( ) . map_or ( false , |p| p. def_id ( ) . is_local ( ) )
275270 }
0 commit comments