Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/span/src/map.rs')
| -rw-r--r-- | crates/span/src/map.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/span/src/map.rs b/crates/span/src/map.rs index 6d8c9c30fb..81fc56c961 100644 --- a/crates/span/src/map.rs +++ b/crates/span/src/map.rs @@ -15,6 +15,9 @@ use crate::{ #[derive(Debug, PartialEq, Eq, Clone, Hash)] pub struct SpanMap<S> { spans: Vec<(TextSize, SpanData<S>)>, + /// Index of the matched macro arm on successful expansion for declarative macros. + // FIXME: Does it make sense to have this here? + pub matched_arm: Option<u32>, } impl<S> SpanMap<S> @@ -23,7 +26,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 |