From 83a542268d907f503793e64b5764c30b301a06d1 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 11 Apr 2024 11:50:36 -0700 Subject: [PATCH] Drop support for compilers older than 1.45 --- build.rs | 4 ---- src/expand.rs | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/build.rs b/build.rs index d7f6b15..04c6250 100644 --- a/build.rs +++ b/build.rs @@ -10,10 +10,6 @@ fn main() { None => return, }; - if compiler < 45 { - println!("cargo:rustc-cfg=no_span_mixed_site"); - } - if compiler < 47 { println!("cargo:rustc-cfg=self_span_hack"); } diff --git a/src/expand.rs b/src/expand.rs index 8179ee7..793e084 100644 --- a/src/expand.rs +++ b/src/expand.rs @@ -427,9 +427,7 @@ fn transform_block(context: Context, sig: &mut Signature, block: &mut Block) { } fn positional_arg(i: usize, pat: &Pat) -> Ident { - let span: Span = syn::spanned::Spanned::span(pat); - #[cfg(not(no_span_mixed_site))] - let span = span.resolved_at(Span::mixed_site()); + let span = syn::spanned::Spanned::span(pat).resolved_at(Span::mixed_site()); format_ident!("__arg{}", i, span = span) }