Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/span.rs')
| -rw-r--r-- | crates/hir-expand/src/span.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir-expand/src/span.rs b/crates/hir-expand/src/span.rs index c16d761c17..589f415de5 100644 --- a/crates/hir-expand/src/span.rs +++ b/crates/hir-expand/src/span.rs @@ -77,7 +77,8 @@ pub struct RealSpanMap { } impl RealSpanMap { - pub fn empty(file_id: FileId) -> Self { + /// Creates a real file span map that returns absolute ranges (relative ranges to the root ast id). + pub fn absolute(file_id: FileId) -> Self { RealSpanMap { file_id, pairs: Box::from([(TextSize::new(0), ROOT_ERASED_FILE_AST_ID)]) } } |