Skip to content

Commit

Permalink
Delete no_lexerror_display config for rustc older than 1.44
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 16, 2023
1 parent 0f00381 commit 467a0b4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ fn main() {
println!("cargo:rustc-cfg=span_locations");
}

if version.minor < 44 {
println!("cargo:rustc-cfg=no_lexerror_display");
}

if version.minor < 45 {
println!("cargo:rustc-cfg=no_hygiene");
}
Expand Down
8 changes: 0 additions & 8 deletions src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,7 @@ impl Debug for LexError {
impl Display for LexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
#[cfg(not(no_lexerror_display))]
LexError::Compiler(e) => Display::fmt(e, f),
#[cfg(no_lexerror_display)]
LexError::Compiler(_e) => Display::fmt(
&fallback::LexError {
span: fallback::Span::call_site(),
},
f,
),
LexError::Fallback(e) => Display::fmt(e, f),
}
}
Expand Down

0 comments on commit 467a0b4

Please sign in to comment.