@@ -25,8 +25,8 @@ pub enum RegionTarget<'tcx> {
2525
2626#[ derive( Default , Debug , Clone ) ]
2727pub 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 > > ,
3030}
3131
3232pub enum AutoTraitResult < A > {
@@ -81,19 +81,12 @@ impl<'tcx> AutoTraitFinder<'tcx> {
8181
8282 let infcx = tcx. infer_ctxt ( ) . build ( ) ;
8383 let mut selcx = SelectionContext :: new ( & infcx) ;
84- for polarity in [ true , false ] {
84+ for polarity in [ ty :: PredicatePolarity :: Positive , ty :: PredicatePolarity :: Negative ] {
8585 let result = selcx. select ( & Obligation :: new (
8686 tcx,
8787 ObligationCause :: dummy ( ) ,
8888 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 } ,
9790 ) ) ;
9891 if let Ok ( Some ( ImplSource :: UserDefined ( _) ) ) = result {
9992 debug ! (
0 commit comments