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) }