diff options
author | Benjamin Coenen <[email protected]> | 2020-04-09 17:37:34 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-09 18:12:50 +0100 |
commit | c1317d692321ba5ba8f138067ebefbb9559d098d (patch) | |
tree | e29a44577e4d2cf55b6f53e3428abea43bbd33d7 /crates/ra_hir_def/src/path | |
parent | fc70cf9458c5234decafdd52b9aced790ac43d7a (diff) | |
parent | 30f0ad159a0f260f54356385de63c171722adb72 (diff) |
feat: add support for feature attributes in struct literal
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/path')
-rw-r--r-- | crates/ra_hir_def/src/path/lower.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/path/lower/lower_use.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs index 4900000fe..3c13cb2c7 100644 --- a/crates/ra_hir_def/src/path/lower.rs +++ b/crates/ra_hir_def/src/path/lower.rs | |||
@@ -28,7 +28,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path> | |||
28 | loop { | 28 | loop { |
29 | let segment = path.segment()?; | 29 | let segment = path.segment()?; |
30 | 30 | ||
31 | if segment.has_colon_colon() { | 31 | if segment.coloncolon().is_some() { |
32 | kind = PathKind::Abs; | 32 | kind = PathKind::Abs; |
33 | } | 33 | } |
34 | 34 | ||
diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/ra_hir_def/src/path/lower/lower_use.rs index 278d5196e..6ec944228 100644 --- a/crates/ra_hir_def/src/path/lower/lower_use.rs +++ b/crates/ra_hir_def/src/path/lower/lower_use.rs | |||
@@ -34,7 +34,7 @@ pub(crate) fn lower_use_tree( | |||
34 | let alias = tree.alias().map(|a| { | 34 | let alias = tree.alias().map(|a| { |
35 | a.name().map(|it| it.as_name()).map_or(ImportAlias::Underscore, ImportAlias::Alias) | 35 | a.name().map(|it| it.as_name()).map_or(ImportAlias::Underscore, ImportAlias::Alias) |
36 | }); | 36 | }); |
37 | let is_glob = tree.has_star(); | 37 | let is_glob = tree.star().is_some(); |
38 | if let Some(ast_path) = tree.path() { | 38 | if let Some(ast_path) = tree.path() { |
39 | // Handle self in a path. | 39 | // Handle self in a path. |
40 | // E.g. `use something::{self, <...>}` | 40 | // E.g. `use something::{self, <...>}` |