aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres.rs
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-06-28 23:18:50 +0100
committerVeetaha <[email protected]>2020-06-28 23:18:50 +0100
commit503f9498cd469c6467250c02bd8f6dbce973dd57 (patch)
treea4809da64326fca4533fa08c2beeb01fb04d160c /crates/ra_hir_def/src/nameres.rs
parente75e2ae5b6b6b1364368ceb3d4081b6508b2f001 (diff)
Follow matklad suggestions
- Move vis_offset() to utils.rs - Shorten explicit ra_syntax::ast -> ast - Undo refactoring exhaustive pattern to non-exhaustive
Diffstat (limited to 'crates/ra_hir_def/src/nameres.rs')
-rw-r--r--crates/ra_hir_def/src/nameres.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs
index 0c18df1a9..b279bdeef 100644
--- a/crates/ra_hir_def/src/nameres.rs
+++ b/crates/ra_hir_def/src/nameres.rs
@@ -137,7 +137,10 @@ impl ModuleOrigin {
137 } 137 }
138 138
139 pub fn is_inline(&self) -> bool { 139 pub fn is_inline(&self) -> bool {
140 matches!(self, ModuleOrigin::Inline { .. }) 140 match self {
141 ModuleOrigin::Inline { .. } => true,
142 ModuleOrigin::CrateRoot { .. } | ModuleOrigin::File { .. } => false,
143 }
141 } 144 }
142 145
143 /// Returns a node which defines this module. 146 /// Returns a node which defines this module.