diff options
author | Aleksey Kladov <[email protected]> | 2021-01-30 15:19:21 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-03-16 13:10:49 +0000 |
commit | f5a81ec4683613bd62624811733345d627f2127b (patch) | |
tree | 54490888591ddc005d510695787308b78739ef05 /crates/ide_assists/src/handlers/change_visibility.rs | |
parent | 62ec04bbd53ba50e21a7b8f23d46958d322640eb (diff) |
Upgrade rowan
Notably, new rowan comes with support for mutable syntax trees.
Diffstat (limited to 'crates/ide_assists/src/handlers/change_visibility.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/change_visibility.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/change_visibility.rs b/crates/ide_assists/src/handlers/change_visibility.rs index ec99a5505..d7e39b2ae 100644 --- a/crates/ide_assists/src/handlers/change_visibility.rs +++ b/crates/ide_assists/src/handlers/change_visibility.rs | |||
@@ -41,7 +41,7 @@ fn add_vis(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | |||
41 | }); | 41 | }); |
42 | 42 | ||
43 | let (offset, target) = if let Some(keyword) = item_keyword { | 43 | let (offset, target) = if let Some(keyword) = item_keyword { |
44 | let parent = keyword.parent(); | 44 | let parent = keyword.parent()?; |
45 | let def_kws = vec![CONST, STATIC, TYPE_ALIAS, FN, MODULE, STRUCT, ENUM, TRAIT]; | 45 | let def_kws = vec![CONST, STATIC, TYPE_ALIAS, FN, MODULE, STRUCT, ENUM, TRAIT]; |
46 | // Parent is not a definition, can't add visibility | 46 | // Parent is not a definition, can't add visibility |
47 | if !def_kws.iter().any(|&def_kw| def_kw == parent.kind()) { | 47 | if !def_kws.iter().any(|&def_kw| def_kw == parent.kind()) { |