diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-05 21:59:10 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-08 20:43:08 +1100 |
| commit | 3c30fe3423b1e7d92584436493bd8fa6f17e13d0 (patch) | |
| tree | a8a90f923fb2cfef11e531817a9c85a79b669055 /compiler/rustc_span/src/source_map.rs | |
| parent | 996bdabc2a31cd86086b6f9beba3a8c58c8ceb8a (diff) | |
| download | rust-3c30fe3423b1e7d92584436493bd8fa6f17e13d0.tar.gz rust-3c30fe3423b1e7d92584436493bd8fa6f17e13d0.zip | |
coverage: Restrict empty-span expansion to only cover `{` and `}`
Diffstat (limited to 'compiler/rustc_span/src/source_map.rs')
| -rw-r--r-- | compiler/rustc_span/src/source_map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs index f36bb38623e..e74a5c2d8fe 100644 --- a/compiler/rustc_span/src/source_map.rs +++ b/compiler/rustc_span/src/source_map.rs @@ -534,7 +534,7 @@ impl SourceMap { /// Extracts the source surrounding the given `Span` using the `extract_source` function. The /// extract function takes three arguments: a string slice containing the source, an index in /// the slice for the beginning of the span and an index in the slice for the end of the span. - fn span_to_source<F, T>(&self, sp: Span, extract_source: F) -> Result<T, SpanSnippetError> + pub fn span_to_source<F, T>(&self, sp: Span, extract_source: F) -> Result<T, SpanSnippetError> where F: Fn(&str, usize, usize) -> Result<T, SpanSnippetError>, { |
