@@ -95,7 +95,7 @@ use resolve_imports::{ImportDirective, NameResolution};
9595
9696// NB: This module needs to be declared first so diagnostics are
9797// registered before they are used.
98- pub mod diagnostics;
98+ mod diagnostics;
9999
100100mod check_unused;
101101mod build_reduced_graph;
@@ -119,12 +119,12 @@ enum SuggestionType {
119119}
120120
121121/// Candidates for a name resolution failure
122- pub struct SuggestedCandidates {
122+ struct SuggestedCandidates {
123123 name : String ,
124124 candidates : Vec < Path > ,
125125}
126126
127- pub enum ResolutionError < ' a > {
127+ enum ResolutionError < ' a > {
128128 /// error E0401: can't use type parameters from outer function
129129 TypeParametersFromOuterFunction ,
130130 /// error E0402: cannot use an outer type parameter in this context
@@ -201,7 +201,7 @@ pub enum ResolutionError<'a> {
201201
202202/// Context of where `ResolutionError::UnresolvedName` arose.
203203#[ derive( Clone , PartialEq , Eq , Debug ) ]
204- pub enum UnresolvedNameContext {
204+ enum UnresolvedNameContext {
205205 /// `PathIsMod(id)` indicates that a given path, used in
206206 /// expression context, actually resolved to a module rather than
207207 /// a value. The `id` attached to the variant is the node id of
@@ -1131,7 +1131,7 @@ pub struct Resolver<'a, 'tcx: 'a> {
11311131 arenas : & ' a ResolverArenas < ' a > ,
11321132}
11331133
1134- pub struct ResolverArenas < ' a > {
1134+ struct ResolverArenas < ' a > {
11351135 modules : arena:: TypedArena < ModuleS < ' a > > ,
11361136 name_bindings : arena:: TypedArena < NameBinding < ' a > > ,
11371137 import_directives : arena:: TypedArena < ImportDirective > ,
@@ -2584,12 +2584,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
25842584
25852585 /// Skips `path_depth` trailing segments, which is also reflected in the
25862586 /// returned value. See `middle::def::PathResolution` for more info.
2587- pub fn resolve_path ( & mut self ,
2588- id : NodeId ,
2589- path : & Path ,
2590- path_depth : usize ,
2591- namespace : Namespace )
2592- -> Option < PathResolution > {
2587+ fn resolve_path ( & mut self , id : NodeId , path : & Path , path_depth : usize , namespace : Namespace )
2588+ -> Option < PathResolution > {
25932589 let span = path. span ;
25942590 let segments = & path. segments [ ..path. segments . len ( ) - path_depth] ;
25952591
@@ -3658,13 +3654,13 @@ pub fn resolve_crate<'a, 'tcx>(session: &'a Session,
36583654/// preserving the ribs + current module. This allows resolve_path
36593655/// calls to be made with the correct scope info. The node in the
36603656/// callback corresponds to the current node in the walk.
3661- pub fn create_resolver < ' a , ' tcx > ( session : & ' a Session ,
3662- ast_map : & ' a hir_map:: Map < ' tcx > ,
3663- krate : & ' a Crate ,
3664- make_glob_map : MakeGlobMap ,
3665- arenas : & ' a ResolverArenas < ' a > ,
3666- callback : Option < Box < Fn ( hir_map:: Node , & mut bool ) -> bool > > )
3667- -> Resolver < ' a , ' tcx > {
3657+ fn create_resolver < ' a , ' tcx > ( session : & ' a Session ,
3658+ ast_map : & ' a hir_map:: Map < ' tcx > ,
3659+ krate : & ' a Crate ,
3660+ make_glob_map : MakeGlobMap ,
3661+ arenas : & ' a ResolverArenas < ' a > ,
3662+ callback : Option < Box < Fn ( hir_map:: Node , & mut bool ) -> bool > > )
3663+ -> Resolver < ' a , ' tcx > {
36683664 let mut resolver = Resolver :: new ( session, ast_map, make_glob_map, arenas) ;
36693665
36703666 resolver. callback = callback;
0 commit comments