diff --git a/build.rs b/build.rs index e5e49ca..edb351a 100644 --- a/build.rs +++ b/build.rs @@ -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"); } diff --git a/src/wrapper.rs b/src/wrapper.rs index 9631cb9..52ba836 100644 --- a/src/wrapper.rs +++ b/src/wrapper.rs @@ -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), } }