@@ -950,9 +950,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
950
950
ty:: ImplPolarity :: Negative if !self . allow_negative_impls => {
951
951
let trait_ref = tcx. impl_trait_ref ( def_id) . unwrap ( ) ;
952
952
let self_ty = trait_ref. self_ty ( ) ;
953
- let string = format ! ( "trait_ref: {:?}, self_ty: {:?}, pred: {:?}" , trait_ref, self_ty, pred) ;
953
+ let string = format ! (
954
+ "trait_ref: {:?}, self_ty: {:?}, pred: {:?}" ,
955
+ trait_ref, self_ty, pred
956
+ ) ;
954
957
warn ! ( "trait_ref: {:?}, self_ty: {:?}, pred: {:?}" , trait_ref, self_ty, pred) ;
955
- if string == "trait_ref: <Foo<()> as std::marker::Send>, self_ty: Foo<()>, pred: Binder(TraitPredicate(<Foo<_> as std::marker::Send>))" {
958
+ if string
959
+ == "trait_ref: <Foo<()> as std::marker::Send>, self_ty: Foo<()>, pred: Binder(TraitPredicate(<Foo<_> as std::marker::Send>))"
960
+ {
956
961
return Ok ( None ) ;
957
962
} else {
958
963
return Err ( Unimplemented ) ;
@@ -1062,7 +1067,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1062
1067
// Instead, we select the right impl now but report "`Bar` does
1063
1068
// not implement `Clone`".
1064
1069
if candidates. len ( ) == 1 {
1065
- return self . filter_negative_and_reservation_impls ( stack. obligation . predicate , candidates. pop ( ) . unwrap ( ) ) ;
1070
+ return self . filter_negative_and_reservation_impls (
1071
+ stack. obligation . predicate ,
1072
+ candidates. pop ( ) . unwrap ( ) ,
1073
+ ) ;
1066
1074
}
1067
1075
1068
1076
// Winnow, but record the exact outcome of evaluation, which
@@ -1135,7 +1143,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1135
1143
}
1136
1144
1137
1145
// Just one candidate left.
1138
- self . filter_negative_and_reservation_impls ( stack. obligation . predicate , candidates. pop ( ) . unwrap ( ) . candidate )
1146
+ self . filter_negative_and_reservation_impls (
1147
+ stack. obligation . predicate ,
1148
+ candidates. pop ( ) . unwrap ( ) . candidate ,
1149
+ )
1139
1150
}
1140
1151
1141
1152
fn is_knowable < ' o > ( & mut self , stack : & TraitObligationStack < ' o , ' tcx > ) -> Option < Conflict > {
0 commit comments