mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Merge #11277
11277: minor: reformat and fix warning r=lnicola a=lnicola bors r+ Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
07ded2aef0
@ -226,9 +226,7 @@ fn find_imported_defs(ctx: &AssistContext, star: SyntaxToken) -> Option<Vec<Defi
|
|||||||
.flat_map(|n| n.descendants().filter_map(ast::NameRef::cast))
|
.flat_map(|n| n.descendants().filter_map(ast::NameRef::cast))
|
||||||
.filter_map(|r| match NameRefClass::classify(&ctx.sema, &r)? {
|
.filter_map(|r| match NameRefClass::classify(&ctx.sema, &r)? {
|
||||||
NameRefClass::Definition(
|
NameRefClass::Definition(
|
||||||
def
|
def @ (Definition::Macro(_)
|
||||||
@
|
|
||||||
(Definition::Macro(_)
|
|
||||||
| Definition::Module(_)
|
| Definition::Module(_)
|
||||||
| Definition::Function(_)
|
| Definition::Function(_)
|
||||||
| Definition::Adt(_)
|
| Definition::Adt(_)
|
||||||
|
@ -216,7 +216,7 @@ fs::Path
|
|||||||
",
|
",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#[test]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn dont_import_trivial_paths() {
|
fn dont_import_trivial_paths() {
|
||||||
cov_mark::check!(dont_import_trivial_paths);
|
cov_mark::check!(dont_import_trivial_paths);
|
||||||
|
@ -171,9 +171,7 @@ pub(crate) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hir::PathResolution::Def(
|
hir::PathResolution::Def(
|
||||||
def
|
def @ (hir::ModuleDef::Adt(_)
|
||||||
@
|
|
||||||
(hir::ModuleDef::Adt(_)
|
|
||||||
| hir::ModuleDef::TypeAlias(_)
|
| hir::ModuleDef::TypeAlias(_)
|
||||||
| hir::ModuleDef::BuiltinType(_)),
|
| hir::ModuleDef::BuiltinType(_)),
|
||||||
) => {
|
) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user