File tree 1 file changed +9
-16
lines changed
compiler/rustc_trait_selection/src/traits
1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -305,22 +305,15 @@ fn negative_impl<'cx, 'tcx>(
305
305
tcx. infer_ctxt ( ) . enter ( |infcx| {
306
306
// create a parameter environment corresponding to a (placeholder) instantiation of impl1
307
307
let impl_env = tcx. param_env ( impl1_def_id) ;
308
- let subject1 = match tcx. impl_subject ( impl1_def_id) {
309
- ImplSubject :: Trait ( impl1_trait_ref) => {
310
- match traits:: fully_normalize (
311
- & infcx,
312
- FulfillmentContext :: new ( ) ,
313
- ObligationCause :: dummy ( ) ,
314
- impl_env,
315
- impl1_trait_ref,
316
- ) {
317
- Ok ( impl1_trait_ref) => ImplSubject :: Trait ( impl1_trait_ref) ,
318
- Err ( err) => {
319
- bug ! ( "failed to fully normalize {:?}: {:?}" , impl1_trait_ref, err) ;
320
- }
321
- }
322
- }
323
- subject @ ImplSubject :: Inherent ( _) => subject,
308
+ let subject1 = match traits:: fully_normalize (
309
+ & infcx,
310
+ FulfillmentContext :: new ( ) ,
311
+ ObligationCause :: dummy ( ) ,
312
+ impl_env,
313
+ tcx. impl_subject ( impl1_def_id) ,
314
+ ) {
315
+ Ok ( s) => s,
316
+ Err ( err) => bug ! ( "failed to fully normalize {:?}: {:?}" , impl1_def_id, err) ,
324
317
} ;
325
318
326
319
let ( subject2, obligations) =
You can’t perform that action at this time.
0 commit comments