Skip to main content

proc_macro_span

Function proc_macro_span 

Source
pub(crate) fn proc_macro_span(db: &dyn SourceDatabase, ast: AstId<Fn>) -> Span
Expand description

Retrieves the span to be used for a proc-macro expansions spans. This is a firewall query as it requires parsing the file, which we don’t want proc-macros to directly depend on as that would cause to frequent invalidations, mainly because of the parse queries being LRU cached. If they weren’t the invalidations would only happen if the user wrote in the file that defines the proc-macro.