diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
commit | cacdb0eab8131bfb945eb7ed0150c92ec56eefe2 (patch) | |
tree | f762de90ce813591bc640ae0bce36493a3dcafa9 /crates/ra_assists/src/change_visibility.rs | |
parent | 4e8664d9d37021e85d72b6228fa45e7edf4a1a74 (diff) | |
parent | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (diff) |
Merge #1486
1486: allow rustfmt to reorder imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/change_visibility.rs')
-rw-r--r-- | crates/ra_assists/src/change_visibility.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/ra_assists/src/change_visibility.rs b/crates/ra_assists/src/change_visibility.rs index 4eb24d27f..6cabba3e3 100644 --- a/crates/ra_assists/src/change_visibility.rs +++ b/crates/ra_assists/src/change_visibility.rs | |||
@@ -1,12 +1,15 @@ | |||
1 | use hir::db::HirDatabase; | 1 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ | 2 | use ra_syntax::{ |
3 | T, | 3 | ast::{self, NameOwner, VisibilityOwner}, |
4 | AstNode, SyntaxNode, TextUnit, | 4 | AstNode, |
5 | ast::{self, VisibilityOwner, NameOwner}, | 5 | SyntaxKind::{ |
6 | SyntaxKind::{VISIBILITY, FN_DEF, MODULE, STRUCT_DEF, ENUM_DEF, TRAIT_DEF, IDENT, WHITESPACE, COMMENT, ATTR}, | 6 | ATTR, COMMENT, ENUM_DEF, FN_DEF, IDENT, MODULE, STRUCT_DEF, TRAIT_DEF, VISIBILITY, |
7 | WHITESPACE, | ||
8 | }, | ||
9 | SyntaxNode, TextUnit, T, | ||
7 | }; | 10 | }; |
8 | 11 | ||
9 | use crate::{AssistCtx, Assist, AssistId}; | 12 | use crate::{Assist, AssistCtx, AssistId}; |
10 | 13 | ||
11 | pub(crate) fn change_visibility(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 14 | pub(crate) fn change_visibility(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { |
12 | if let Some(vis) = ctx.node_at_offset::<ast::Visibility>() { | 15 | if let Some(vis) = ctx.node_at_offset::<ast::Visibility>() { |