@@ -25,8 +25,8 @@ pub enum RegionTarget<'tcx> {
25
25
26
26
#[ derive( Default , Debug , Clone ) ]
27
27
pub struct RegionDeps < ' tcx > {
28
- larger : FxIndexSet < RegionTarget < ' tcx > > ,
29
- smaller : FxIndexSet < RegionTarget < ' tcx > > ,
28
+ pub larger : FxIndexSet < RegionTarget < ' tcx > > ,
29
+ pub smaller : FxIndexSet < RegionTarget < ' tcx > > ,
30
30
}
31
31
32
32
pub enum AutoTraitResult < A > {
@@ -81,19 +81,12 @@ impl<'tcx> AutoTraitFinder<'tcx> {
81
81
82
82
let infcx = tcx. infer_ctxt ( ) . build ( ) ;
83
83
let mut selcx = SelectionContext :: new ( & infcx) ;
84
- for polarity in [ true , false ] {
84
+ for polarity in [ ty :: PredicatePolarity :: Positive , ty :: PredicatePolarity :: Negative ] {
85
85
let result = selcx. select ( & Obligation :: new (
86
86
tcx,
87
87
ObligationCause :: dummy ( ) ,
88
88
orig_env,
89
- ty:: TraitPredicate {
90
- trait_ref,
91
- polarity : if polarity {
92
- ty:: PredicatePolarity :: Positive
93
- } else {
94
- ty:: PredicatePolarity :: Negative
95
- } ,
96
- } ,
89
+ ty:: TraitPredicate { trait_ref, polarity } ,
97
90
) ) ;
98
91
if let Ok ( Some ( ImplSource :: UserDefined ( _) ) ) = result {
99
92
debug ! (
0 commit comments