mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
single_match
This commit is contained in:
parent
9dd07f0bc4
commit
b1a0c9ac40
14 changed files with 89 additions and 130 deletions
|
@ -295,15 +295,12 @@ fn render_resolution_pat(
|
|||
let _p = profile::span("render_resolution");
|
||||
use hir::ModuleDef::*;
|
||||
|
||||
match resolution {
|
||||
ScopeDef::ModuleDef(Macro(mac)) => {
|
||||
let ctx = ctx.import_to_add(import_to_add);
|
||||
return render_macro_pat(ctx, pattern_ctx, local_name, mac);
|
||||
}
|
||||
_ => (),
|
||||
if let ScopeDef::ModuleDef(Macro(mac)) = resolution {
|
||||
let ctx = ctx.import_to_add(import_to_add);
|
||||
render_macro_pat(ctx, pattern_ctx, local_name, mac)
|
||||
} else {
|
||||
render_resolution_simple_(ctx, &local_name, import_to_add, resolution)
|
||||
}
|
||||
|
||||
render_resolution_simple_(ctx, &local_name, import_to_add, resolution)
|
||||
}
|
||||
|
||||
fn render_resolution_path(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue