@@ -111,8 +111,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
111
111
self . assemble_candidates_for_transmutability ( obligation, & mut candidates) ;
112
112
} else if tcx. is_lang_item ( def_id, LangItem :: Tuple ) {
113
113
self . assemble_candidate_for_tuple ( obligation, & mut candidates) ;
114
- } else if tcx. is_lang_item ( def_id, LangItem :: PointerLike ) {
115
- self . assemble_candidate_for_pointer_like ( obligation, & mut candidates) ;
116
114
} else if tcx. is_lang_item ( def_id, LangItem :: FnPtrTrait ) {
117
115
self . assemble_candidates_for_fn_ptr_trait ( obligation, & mut candidates) ;
118
116
} else {
@@ -1216,35 +1214,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1216
1214
}
1217
1215
}
1218
1216
1219
- fn assemble_candidate_for_pointer_like (
1220
- & mut self ,
1221
- obligation : & PolyTraitObligation < ' tcx > ,
1222
- candidates : & mut SelectionCandidateSet < ' tcx > ,
1223
- ) {
1224
- // The regions of a type don't affect the size of the type
1225
- let tcx = self . tcx ( ) ;
1226
- let self_ty = tcx. instantiate_bound_regions_with_erased ( obligation. predicate . self_ty ( ) ) ;
1227
-
1228
- // But if there are inference variables, we have to wait until it's resolved.
1229
- if ( obligation. param_env , self_ty) . has_non_region_infer ( ) {
1230
- candidates. ambiguous = true ;
1231
- return ;
1232
- }
1233
-
1234
- // We should erase regions from both the param-env and type, since both
1235
- // may have infer regions. Specifically, after canonicalizing and instantiating,
1236
- // early bound regions turn into region vars in both the new and old solver.
1237
- let key = self . infcx . pseudo_canonicalize_query (
1238
- tcx. erase_regions ( obligation. param_env ) ,
1239
- tcx. erase_regions ( self_ty) ,
1240
- ) ;
1241
- if let Ok ( layout) = tcx. layout_of ( key)
1242
- && layout. layout . is_pointer_like ( & tcx. data_layout )
1243
- {
1244
- candidates. vec . push ( BuiltinCandidate { has_nested : false } ) ;
1245
- }
1246
- }
1247
-
1248
1217
fn assemble_candidates_for_fn_ptr_trait (
1249
1218
& mut self ,
1250
1219
obligation : & PolyTraitObligation < ' tcx > ,
0 commit comments