@@ -95,7 +95,7 @@ use resolve_imports::{ImportDirective, NameResolution};
95
95
96
96
// NB: This module needs to be declared first so diagnostics are
97
97
// registered before they are used.
98
- pub mod diagnostics;
98
+ mod diagnostics;
99
99
100
100
mod check_unused;
101
101
mod build_reduced_graph;
@@ -119,12 +119,12 @@ enum SuggestionType {
119
119
}
120
120
121
121
/// Candidates for a name resolution failure
122
- pub struct SuggestedCandidates {
122
+ struct SuggestedCandidates {
123
123
name : String ,
124
124
candidates : Vec < Path > ,
125
125
}
126
126
127
- pub enum ResolutionError < ' a > {
127
+ enum ResolutionError < ' a > {
128
128
/// error E0401: can't use type parameters from outer function
129
129
TypeParametersFromOuterFunction ,
130
130
/// error E0402: cannot use an outer type parameter in this context
@@ -201,7 +201,7 @@ pub enum ResolutionError<'a> {
201
201
202
202
/// Context of where `ResolutionError::UnresolvedName` arose.
203
203
#[ derive( Clone , PartialEq , Eq , Debug ) ]
204
- pub enum UnresolvedNameContext {
204
+ enum UnresolvedNameContext {
205
205
/// `PathIsMod(id)` indicates that a given path, used in
206
206
/// expression context, actually resolved to a module rather than
207
207
/// a value. The `id` attached to the variant is the node id of
@@ -1131,7 +1131,7 @@ pub struct Resolver<'a, 'tcx: 'a> {
1131
1131
arenas : & ' a ResolverArenas < ' a > ,
1132
1132
}
1133
1133
1134
- pub struct ResolverArenas < ' a > {
1134
+ struct ResolverArenas < ' a > {
1135
1135
modules : arena:: TypedArena < ModuleS < ' a > > ,
1136
1136
name_bindings : arena:: TypedArena < NameBinding < ' a > > ,
1137
1137
import_directives : arena:: TypedArena < ImportDirective > ,
@@ -2584,12 +2584,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
2584
2584
2585
2585
/// Skips `path_depth` trailing segments, which is also reflected in the
2586
2586
/// 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 > {
2593
2589
let span = path. span ;
2594
2590
let segments = & path. segments [ ..path. segments . len ( ) - path_depth] ;
2595
2591
@@ -3658,13 +3654,13 @@ pub fn resolve_crate<'a, 'tcx>(session: &'a Session,
3658
3654
/// preserving the ribs + current module. This allows resolve_path
3659
3655
/// calls to be made with the correct scope info. The node in the
3660
3656
/// 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 > {
3668
3664
let mut resolver = Resolver :: new ( session, ast_map, make_glob_map, arenas) ;
3669
3665
3670
3666
resolver. callback = callback;
0 commit comments