mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Render matched macro arm on hover of macro calls
This commit is contained in:
parent
062e1b9b81
commit
6bfdd38c69
11 changed files with 133 additions and 65 deletions
|
@ -15,6 +15,7 @@ use crate::{
|
|||
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
|
||||
pub struct SpanMap<S> {
|
||||
spans: Vec<(TextSize, SpanData<S>)>,
|
||||
pub matched_arm: Option<u32>,
|
||||
}
|
||||
|
||||
impl<S> SpanMap<S>
|
||||
|
@ -23,7 +24,7 @@ where
|
|||
{
|
||||
/// Creates a new empty [`SpanMap`].
|
||||
pub fn empty() -> Self {
|
||||
Self { spans: Vec::new() }
|
||||
Self { spans: Vec::new(), matched_arm: None }
|
||||
}
|
||||
|
||||
/// Finalizes the [`SpanMap`], shrinking its backing storage and validating that the offsets are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue