aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists
diff options
context:
space:
mode:
authoruHOOCCOOHu <[email protected]>2019-09-26 18:59:38 +0100
committeruHOOCCOOHu <[email protected]>2019-09-26 19:05:06 +0100
commit2ecb126f5caeb248e333f8559eb1b7dfd34cc744 (patch)
tree02ca4f902520e3d2ec98fe8ce71be8a319bcdc66 /crates/ra_assists/src/assists
parent8cd23a4fb8c6a1012ba3e40dd3329a5abaed06b7 (diff)
Support `$crate` in item and expr place.
Diffstat (limited to 'crates/ra_assists/src/assists')
-rw-r--r--crates/ra_assists/src/assists/auto_import.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs
index 5aae98546..43c14ad23 100644
--- a/crates/ra_assists/src/assists/auto_import.rs
+++ b/crates/ra_assists/src/assists/auto_import.rs
@@ -512,7 +512,7 @@ pub fn collect_hir_path_segments(path: &hir::Path) -> Option<Vec<SmolStr>> {
512 hir::PathKind::Plain => {} 512 hir::PathKind::Plain => {}
513 hir::PathKind::Self_ => ps.push("self".into()), 513 hir::PathKind::Self_ => ps.push("self".into()),
514 hir::PathKind::Super => ps.push("super".into()), 514 hir::PathKind::Super => ps.push("super".into()),
515 hir::PathKind::Type(_) => return None, 515 hir::PathKind::Type(_) | hir::PathKind::DollarCrate(_) => return None,
516 } 516 }
517 for s in path.segments.iter() { 517 for s in path.segments.iter() {
518 ps.push(s.name.to_string().into()); 518 ps.push(s.name.to_string().into());