mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Emit test name in Run test runnables if it comes from a macro expansion
This commit is contained in:
parent
dd69d4a97c
commit
f1b3446844
6 changed files with 363 additions and 136 deletions
|
@ -1554,12 +1554,12 @@ fn runnable_action_links(
|
|||
return None;
|
||||
}
|
||||
|
||||
let action: &'static _ = runnable.action();
|
||||
let title = runnable.title();
|
||||
to_proto::runnable(snap, runnable).ok().map(|r| {
|
||||
let mut group = lsp_ext::CommandLinkGroup::default();
|
||||
|
||||
if hover_actions_config.run {
|
||||
let run_command = to_proto::command::run_single(&r, action.run_title);
|
||||
let run_command = to_proto::command::run_single(&r, &title);
|
||||
group.commands.push(to_command_link(run_command, r.label.clone()));
|
||||
}
|
||||
|
||||
|
|
|
@ -958,15 +958,11 @@ pub(crate) fn code_lens(
|
|||
let line_index = snap.file_line_index(run.nav.file_id)?;
|
||||
let annotation_range = range(&line_index, annotation.range);
|
||||
|
||||
let action = run.action();
|
||||
let title = run.title();
|
||||
let r = runnable(snap, run)?;
|
||||
|
||||
let command = if debug {
|
||||
command::debug_single(&r)
|
||||
} else {
|
||||
let title = action.run_title.to_string();
|
||||
command::run_single(&r, &title)
|
||||
};
|
||||
let command =
|
||||
if debug { command::debug_single(&r) } else { command::run_single(&r, &title) };
|
||||
|
||||
Ok(lsp_types::CodeLens { range: annotation_range, command: Some(command), data: None })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue