mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
Reformat
This commit is contained in:
parent
64f56f458f
commit
27306c5e4b
21 changed files with 21 additions and 21 deletions
|
@ -2,6 +2,7 @@
|
|||
//! example.
|
||||
|
||||
use hir::{ImportPathConfig, PathResolution, Semantics};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{
|
||||
helpers::mod_path_to_ast,
|
||||
imports::insert_use::{insert_use, ImportScope},
|
||||
|
@ -14,7 +15,6 @@ use syntax::{
|
|||
ast::{self, make},
|
||||
Edition, SyntaxKind, SyntaxNode,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsConfig, Severity};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use hir::db::ExpandDatabase;
|
||||
use hir::HirFileIdExt;
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{assists::Assist, source_change::SourceChange};
|
||||
use syntax::{ast, SyntaxNode};
|
||||
use syntax::{match_ast, AstNode};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use hir::db::ExpandDatabase;
|
||||
use ide_db::source_change::SourceChange;
|
||||
use syntax::{ast, AstNode, SyntaxKind, SyntaxNode, SyntaxNodePtr, SyntaxToken, T};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use syntax::{ast, AstNode, SyntaxKind, SyntaxNode, SyntaxNodePtr, SyntaxToken, T};
|
||||
|
||||
use crate::{fix, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use either::Either;
|
||||
use hir::{db::ExpandDatabase, HasSource, HirDisplay, HirFileIdExt, Semantics, VariantId};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{source_change::SourceChange, EditionedFileId, RootDatabase};
|
||||
use syntax::{
|
||||
ast::{self, edit::IndentLevel, make},
|
||||
AstNode,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{fix, Assist, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use hir::{db::ExpandDatabase, diagnostics::RemoveTrailingReturn, FileRange};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{assists::Assist, source_change::SourceChange};
|
||||
use syntax::{ast, AstNode};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{adjusted_display_range, fix, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use hir::{db::ExpandDatabase, diagnostics::RemoveUnnecessaryElse, HirFileIdExt};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{assists::Assist, source_change::SourceChange};
|
||||
use itertools::Itertools;
|
||||
use syntax::{
|
||||
|
@ -8,7 +9,6 @@ use syntax::{
|
|||
},
|
||||
AstNode, SyntaxToken, TextRange,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{
|
||||
adjusted_display_range, fix, Diagnostic, DiagnosticCode, DiagnosticsContext, Severity,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use hir::{db::ExpandDatabase, HirFileIdExt, InFile};
|
||||
use ide_db::source_change::SourceChange;
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use syntax::{
|
||||
ast::{self, HasArgList},
|
||||
AstNode, TextRange,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{fix, Assist, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use hir::{db::ExpandDatabase, HasSource, HirDisplay};
|
||||
use ide_db::text_edit::TextRange;
|
||||
use ide_db::{
|
||||
assists::{Assist, AssistId, AssistKind},
|
||||
label::Label,
|
||||
source_change::SourceChangeBuilder,
|
||||
};
|
||||
use syntax::ToSmolStr;
|
||||
use ide_db::text_edit::TextRange;
|
||||
|
||||
use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use either::Either;
|
||||
use hir::{db::ExpandDatabase, ClosureStyle, HirDisplay, HirFileIdExt, InFile, Type};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{famous_defs::FamousDefs, source_change::SourceChange};
|
||||
use syntax::{
|
||||
ast::{
|
||||
|
@ -9,7 +10,6 @@ use syntax::{
|
|||
},
|
||||
AstNode, AstPtr, TextSize,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{adjusted_display_range, fix, Assist, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ use hir::{
|
|||
term_search::{term_search, TermSearchConfig, TermSearchCtx},
|
||||
ClosureStyle, HirDisplay, ImportPathConfig,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{
|
||||
assists::{Assist, AssistId, AssistKind, GroupLabel},
|
||||
label::Label,
|
||||
source_change::SourceChange,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use std::iter;
|
||||
|
||||
use hir::{db::DefDatabase, DefMap, InFile, ModuleSource};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{
|
||||
base_db::{FileLoader, SourceDatabase, SourceRootDatabase},
|
||||
source_change::SourceChange,
|
||||
|
@ -13,7 +14,6 @@ use syntax::{
|
|||
ast::{self, edit::IndentLevel, HasModuleItem, HasName},
|
||||
AstNode, TextRange,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{fix, Assist, Diagnostic, DiagnosticCode, DiagnosticsContext, Severity};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::iter;
|
||||
|
||||
use hir::{db::ExpandDatabase, Adt, FileRange, HasSource, HirDisplay, InFile, Struct, Union};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{
|
||||
assists::{Assist, AssistId, AssistKind},
|
||||
helpers::is_editable_crate,
|
||||
|
@ -16,7 +17,6 @@ use syntax::{
|
|||
ast::{edit::AstNodeEdit, Type},
|
||||
SyntaxNode,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{adjusted_display_range, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use hir::{db::ExpandDatabase, AssocItem, FileRange, HirDisplay, InFile};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{
|
||||
assists::{Assist, AssistId, AssistKind},
|
||||
label::Label,
|
||||
|
@ -8,7 +9,6 @@ use syntax::{
|
|||
ast::{self, make, HasArgList},
|
||||
format_smolstr, AstNode, SmolStr, TextRange, ToSmolStr,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{adjusted_display_range, Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use hir::Name;
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{
|
||||
assists::{Assist, AssistId, AssistKind},
|
||||
label::Label,
|
||||
|
@ -6,7 +7,6 @@ use ide_db::{
|
|||
FileRange, RootDatabase,
|
||||
};
|
||||
use syntax::{Edition, TextRange};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext};
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ use hir::{
|
|||
sym, ClosureStyle, HasVisibility, HirDisplay, HirDisplayError, HirWrite, ModuleDef,
|
||||
ModuleDefId, Semantics,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{famous_defs::FamousDefs, FileRange, RootDatabase};
|
||||
use itertools::Itertools;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
@ -17,7 +18,6 @@ use syntax::{
|
|||
ast::{self, AstNode, HasGenericParams},
|
||||
format_smolstr, match_ast, SmolStr, SyntaxNode, TextRange, TextSize, WalkEvent,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{navigation_target::TryToNav, FileId};
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ use hir::{
|
|||
};
|
||||
use ide_db::famous_defs::FamousDefs;
|
||||
|
||||
use ide_db::text_edit::TextEditBuilder;
|
||||
use span::EditionedFileId;
|
||||
use stdx::never;
|
||||
use syntax::{
|
||||
ast::{self, make, AstNode},
|
||||
ted,
|
||||
};
|
||||
use ide_db::text_edit::TextEditBuilder;
|
||||
|
||||
use crate::{
|
||||
AdjustmentHints, AdjustmentHintsMode, InlayHint, InlayHintLabel, InlayHintLabelPart,
|
||||
|
|
|
@ -7,9 +7,9 @@ use std::mem;
|
|||
use hir::Mutability;
|
||||
use ide_db::famous_defs::FamousDefs;
|
||||
|
||||
use ide_db::text_edit::TextEditBuilder;
|
||||
use span::EditionedFileId;
|
||||
use syntax::ast::{self, AstNode};
|
||||
use ide_db::text_edit::TextEditBuilder;
|
||||
|
||||
use crate::{InlayHint, InlayHintLabel, InlayHintPosition, InlayHintsConfig, InlayKind};
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
//!
|
||||
//! Tests live in [`bind_pat`][super::bind_pat] module.
|
||||
use ide_db::famous_defs::FamousDefs;
|
||||
use ide_db::text_edit::{TextRange, TextSize};
|
||||
use span::EditionedFileId;
|
||||
use stdx::{never, TupleExt};
|
||||
use syntax::ast::{self, AstNode};
|
||||
use ide_db::text_edit::{TextRange, TextSize};
|
||||
|
||||
use crate::{
|
||||
InlayHint, InlayHintLabel, InlayHintLabelPart, InlayHintPosition, InlayHintsConfig, InlayKind,
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
//! }
|
||||
//! ```
|
||||
use hir::Semantics;
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use ide_db::{famous_defs::FamousDefs, RootDatabase};
|
||||
use span::EditionedFileId;
|
||||
use syntax::ast::{self, AstNode, HasName};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{
|
||||
DiscriminantHints, InlayHint, InlayHintLabel, InlayHintPosition, InlayHintsConfig, InlayKind,
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
//! ```
|
||||
use either::Either;
|
||||
use ide_db::famous_defs::FamousDefs;
|
||||
use ide_db::text_edit::TextEdit;
|
||||
use span::EditionedFileId;
|
||||
use syntax::{
|
||||
ast::{self, AstNode},
|
||||
SyntaxKind,
|
||||
};
|
||||
use ide_db::text_edit::TextEdit;
|
||||
|
||||
use crate::{InlayHint, InlayHintPosition, InlayHintsConfig, InlayKind, LifetimeElisionHints};
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ pub use ide_completion::{
|
|||
CallableSnippets, CompletionConfig, CompletionFieldsToResolve, CompletionItem,
|
||||
CompletionItemKind, CompletionRelevance, Snippet, SnippetScope,
|
||||
};
|
||||
pub use ide_db::text_edit::{Indel, TextEdit};
|
||||
pub use ide_db::{
|
||||
base_db::{Cancelled, CrateGraph, CrateId, FileChange, SourceRoot, SourceRootId},
|
||||
documentation::Documentation,
|
||||
|
@ -139,7 +140,6 @@ pub use ide_diagnostics::{
|
|||
pub use ide_ssr::SsrError;
|
||||
pub use span::Edition;
|
||||
pub use syntax::{TextRange, TextSize};
|
||||
pub use ide_db::text_edit::{Indel, TextEdit};
|
||||
|
||||
pub type Cancellable<T> = Result<T, Cancelled>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue