Skip to content

Commit

Permalink
Merge pull request #383 from dtolnay/procmacrospan
Browse files Browse the repository at this point in the history
Disable start()/end() on Span::Compiler
  • Loading branch information
dtolnay authored May 15, 2023
2 parents a597b3c + 5f9d3fe commit 8bbbd60
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,6 @@ impl Span {
#[cfg(span_locations)]
pub fn start(&self) -> LineColumn {
match self {
#[cfg(proc_macro_span)]
Span::Compiler(s) => {
let proc_macro::LineColumn { line, column } = s.start();
LineColumn { line, column }
}
#[cfg(not(proc_macro_span))]
Span::Compiler(_) => LineColumn { line: 0, column: 0 },
Span::Fallback(s) => s.start(),
}
Expand All @@ -484,12 +478,6 @@ impl Span {
#[cfg(span_locations)]
pub fn end(&self) -> LineColumn {
match self {
#[cfg(proc_macro_span)]
Span::Compiler(s) => {
let proc_macro::LineColumn { line, column } = s.end();
LineColumn { line, column }
}
#[cfg(not(proc_macro_span))]
Span::Compiler(_) => LineColumn { line: 0, column: 0 },
Span::Fallback(s) => s.end(),
}
Expand Down

0 comments on commit 8bbbd60

Please sign in to comment.