@@ -16,7 +16,7 @@ use crate::infer::{InferCtxt, RegionVariableOrigin};
1616/// Attempts to generalize `term` for the type variable `for_vid`.
1717/// This checks for cycles -- that is, whether the type `term`
1818/// references `for_vid`.
19- pub ( super ) fn generalize < ' tcx , D : GeneralizerDelegate < ' tcx > , T : Into < Term < ' tcx > > + Relate < ' tcx > > (
19+ pub fn generalize < ' tcx , D : GeneralizerDelegate < ' tcx > , T : Into < Term < ' tcx > > + Relate < ' tcx > > (
2020 infcx : & InferCtxt < ' tcx > ,
2121 delegate : & mut D ,
2222 term : T ,
@@ -54,7 +54,7 @@ pub(super) fn generalize<'tcx, D: GeneralizerDelegate<'tcx>, T: Into<Term<'tcx>>
5454
5555/// Abstracts the handling of region vars between HIR and MIR/NLL typechecking
5656/// in the generalizer code.
57- pub ( super ) trait GeneralizerDelegate < ' tcx > {
57+ pub trait GeneralizerDelegate < ' tcx > {
5858 fn param_env ( & self ) -> ty:: ParamEnv < ' tcx > ;
5959
6060 fn forbid_inference_vars ( ) -> bool ;
@@ -64,7 +64,7 @@ pub(super) trait GeneralizerDelegate<'tcx> {
6464 fn generalize_region ( & mut self , universe : ty:: UniverseIndex ) -> ty:: Region < ' tcx > ;
6565}
6666
67- pub ( super ) struct CombineDelegate < ' cx , ' tcx > {
67+ pub struct CombineDelegate < ' cx , ' tcx > {
6868 pub infcx : & ' cx InferCtxt < ' tcx > ,
6969 pub param_env : ty:: ParamEnv < ' tcx > ,
7070 pub span : Span ,
@@ -515,7 +515,7 @@ where
515515/// not only the generalized type, but also a bool flag
516516/// indicating whether further WF checks are needed.
517517#[ derive( Debug ) ]
518- pub ( super ) struct Generalization < T > {
518+ pub struct Generalization < T > {
519519 /// When generalizing `<?0 as Trait>::Assoc` or
520520 /// `<T as Bar<<?0 as Foo>::Assoc>>::Assoc`
521521 /// for `?0` generalization returns an inference
@@ -524,7 +524,7 @@ pub(super) struct Generalization<T> {
524524 /// This has to be handled wotj care as it can
525525 /// otherwise very easily result in infinite
526526 /// recursion.
527- pub ( super ) value_may_be_infer : T ,
527+ pub value_may_be_infer : T ,
528528
529529 /// If true, then the generalized type may not be well-formed,
530530 /// even if the source type is well-formed, so we should add an
@@ -551,5 +551,5 @@ pub(super) struct Generalization<T> {
551551 /// will force the calling code to check that `WF(Foo<?C, ?D>)`
552552 /// holds, which in turn implies that `?C::Item == ?D`. So once
553553 /// `?C` is constrained, that should suffice to restrict `?D`.
554- pub ( super ) needs_wf : bool ,
554+ pub needs_wf : bool ,
555555}
0 commit comments