diff options
-rw-r--r-- | crates/hir/src/display.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs index e3660442c..44cdcc296 100644 --- a/crates/hir/src/display.rs +++ b/crates/hir/src/display.rs | |||
@@ -431,6 +431,10 @@ impl HirDisplay for Module { | |||
431 | // FIXME: Module doesn't have visibility saved in data. | 431 | // FIXME: Module doesn't have visibility saved in data. |
432 | match self.name(f.db) { | 432 | match self.name(f.db) { |
433 | Some(name) => write!(f, "mod {}", name), | 433 | Some(name) => write!(f, "mod {}", name), |
434 | None if self.crate_root(f.db) == *self => match self.krate().display_name(f.db) { | ||
435 | Some(name) => write!(f, "extern crate {}", name), | ||
436 | None => write!(f, "extern crate {{unknown}}"), | ||
437 | }, | ||
434 | None => write!(f, "mod {{unnamed}}"), | 438 | None => write!(f, "mod {{unnamed}}"), |
435 | } | 439 | } |
436 | } | 440 | } |