From 326f066aa21ed2f40f064d0a6c1bdf7d519bfd7b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 16:47:29 +0300 Subject: Reduce visibility --- crates/ra_hir_def/src/path.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir_def/src/path.rs') diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs index 626ebffdc..94f6a27bc 100644 --- a/crates/ra_hir_def/src/path.rs +++ b/crates/ra_hir_def/src/path.rs @@ -66,7 +66,7 @@ pub enum PathKind { impl Path { /// Calls `cb` with all paths, represented by this use item. - pub fn expand_use_item( + pub(crate) fn expand_use_item( item_src: Source, hygiene: &Hygiene, mut cb: impl FnMut(Path, &ast::UseTree, bool, Option), @@ -76,7 +76,10 @@ impl Path { } } - pub fn from_simple_segments(kind: PathKind, segments: impl IntoIterator) -> Path { + pub(crate) fn from_simple_segments( + kind: PathKind, + segments: impl IntoIterator, + ) -> Path { Path { kind, segments: segments @@ -94,7 +97,7 @@ impl Path { /// Converts an `ast::Path` to `Path`. Works with use trees. /// It correctly handles `$crate` based path from macro call. - pub fn from_src(mut path: ast::Path, hygiene: &Hygiene) -> Option { + pub(crate) fn from_src(mut path: ast::Path, hygiene: &Hygiene) -> Option { let mut kind = PathKind::Plain; let mut segments = Vec::new(); loop { @@ -227,7 +230,7 @@ impl Path { } impl GenericArgs { - pub fn from_ast(node: ast::TypeArgList) -> Option { + pub(crate) fn from_ast(node: ast::TypeArgList) -> Option { let mut args = Vec::new(); for type_arg in node.type_args() { let type_ref = TypeRef::from_ast_opt(type_arg.type_ref()); -- cgit v1.2.3