diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-10 00:16:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-10 00:16:58 +0100 |
commit | 7a03f05eac4ff1e9ca4ceeced54ce06892bd30b8 (patch) | |
tree | 2a8074952398d7d72d8a83ddda35785c4821e20b /crates/ra_hir/src/code_model.rs | |
parent | b1cb4ac13d5b625dd497692b6396287a30ff12e2 (diff) | |
parent | bf9b4578bbe038501ef7c337e22b448de477f61c (diff) |
Merge #5692
5692: Add support for extern crate r=jonas-schievink a=Nashenas88
This adds syntax highlighting, hover and goto def functionality for extern crate.
Fixes #5690
Co-authored-by: Paul Daniel Faria <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 27cdabea0..44456e49e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -83,9 +83,9 @@ impl Crate { | |||
83 | .collect() | 83 | .collect() |
84 | } | 84 | } |
85 | 85 | ||
86 | pub fn root_module(self, db: &dyn HirDatabase) -> Option<Module> { | 86 | pub fn root_module(self, db: &dyn HirDatabase) -> Module { |
87 | let module_id = db.crate_def_map(self.id).root; | 87 | let module_id = db.crate_def_map(self.id).root; |
88 | Some(Module::new(self, module_id)) | 88 | Module::new(self, module_id) |
89 | } | 89 | } |
90 | 90 | ||
91 | pub fn root_file(self, db: &dyn HirDatabase) -> FileId { | 91 | pub fn root_file(self, db: &dyn HirDatabase) -> FileId { |