Skip to content

Commit 5fae65d

Browse files
bors[bot]Veykril
andauthored
Merge #11639
11639: internal: Re-arrange ide_db modules r=Veykril a=Veykril Thins out the `helpers` module by giving some items more appropriate places to live bors r+ Co-authored-by: Lukas Wirth <[email protected]>
2 parents b953812 + 93b09ca commit 5fae65d

File tree

86 files changed

+670
-683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+670
-683
lines changed

crates/hir/src/attrs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ fn resolve_doc_path(
149149
};
150150

151151
let modpath = {
152+
// FIXME: this is not how we should get a mod path here
152153
let ast_path = ast::SourceFile::parse(&format!("type T = {};", link))
153154
.syntax_node()
154155
.descendants()

crates/ide/src/expand_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use hir::Semantics;
22
use ide_db::{
3-
helpers::{insert_whitespace_into_node::insert_ws_into, pick_best_token},
3+
helpers::pick_best_token, syntax_helpers::insert_whitespace_into_node::insert_ws_into,
44
RootDatabase,
55
};
66
use syntax::{ast, ted, AstNode, NodeOrToken, SyntaxKind, SyntaxNode, T};

crates/ide/src/folding_ranges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use ide_db::helpers::node_ext::vis_eq;
1+
use ide_db::syntax_helpers::node_ext::vis_eq;
22
use rustc_hash::FxHashSet;
33

44
use syntax::{

crates/ide/src/highlight_related.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ use hir::Semantics;
22
use ide_db::{
33
base_db::{FileId, FilePosition},
44
defs::{Definition, IdentClass},
5-
helpers::{
6-
for_each_break_and_continue_expr, for_each_tail_expr, node_ext::walk_expr, pick_best_token,
7-
},
5+
helpers::pick_best_token,
86
search::{FileReference, ReferenceCategory, SearchScope},
7+
syntax_helpers::node_ext::{for_each_break_and_continue_expr, for_each_tail_expr, walk_expr},
98
RootDatabase,
109
};
1110
use rustc_hash::FxHashSet;

crates/ide/src/hover.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use hir::{HasSource, Semantics};
1010
use ide_db::{
1111
base_db::FileRange,
1212
defs::{Definition, IdentClass},
13-
helpers::{pick_best_token, FamousDefs},
13+
famous_defs::FamousDefs,
14+
helpers::pick_best_token,
1415
FxIndexSet, RootDatabase,
1516
};
1617
use itertools::Itertools;

crates/ide/src/hover/render.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ use hir::{AsAssocItem, AttributeTemplate, HasAttrs, HasSource, HirDisplay, Seman
66
use ide_db::{
77
base_db::SourceDatabase,
88
defs::Definition,
9-
helpers::{
10-
generated_lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES},
11-
FamousDefs,
12-
},
9+
famous_defs::FamousDefs,
10+
generated::lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES},
1311
RootDatabase,
1412
};
1513
use itertools::Itertools;

crates/ide/src/inlay_hints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use either::Either;
22
use hir::{known, Callable, HasVisibility, HirDisplay, Semantics, TypeInfo};
3-
use ide_db::{base_db::FileRange, helpers::FamousDefs, RootDatabase};
3+
use ide_db::{base_db::FileRange, famous_defs::FamousDefs, RootDatabase};
44
use itertools::Itertools;
55
use stdx::to_lower_snake_case;
66
use syntax::{

crates/ide/src/join_lines.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use ide_assists::utils::extract_trivial_expression;
2-
use ide_db::helpers::node_ext::expr_as_name_ref;
2+
use ide_db::syntax_helpers::node_ext::expr_as_name_ref;
33
use itertools::Itertools;
44
use syntax::{
55
ast::{self, AstNode, AstToken, IsString},

crates/ide/src/syntax_highlighting/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Syntax highlighting for format macro strings.
22
use ide_db::{
3-
helpers::format_string::{is_format_string, lex_format_specifiers, FormatSpecifier},
3+
syntax_helpers::format_string::{is_format_string, lex_format_specifiers, FormatSpecifier},
44
SymbolKind,
55
};
66
use syntax::{ast, TextRange};

crates/ide/src/syntax_highlighting/highlight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use hir::{AsAssocItem, HasVisibility, Semantics};
44
use ide_db::{
55
defs::{Definition, IdentClass, NameClass, NameRefClass},
6-
helpers::FamousDefs,
6+
famous_defs::FamousDefs,
77
RootDatabase, SymbolKind,
88
};
99
use rustc_hash::FxHashMap;

0 commit comments

Comments
 (0)