diff --git a/rust/Makefile b/rust/Makefile index da1a7409d984..5ee9c30c324a 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -100,6 +100,7 @@ zerocopy-envs := \ proc_macro2-cfgs := \ feature="proc-macro" \ wrap_proc_macro \ + proc_macro_span \ $(if $(call rustc-min-version,108800),proc_macro_span_file proc_macro_span_location) proc_macro2-flags := \ diff --git a/rust/proc-macro2/README.md b/rust/proc-macro2/README.md index af044fee4f59..519d01112a02 100644 --- a/rust/proc-macro2/README.md +++ b/rust/proc-macro2/README.md @@ -4,7 +4,8 @@ These source files come from the Rust `proc-macro2` crate, version 1.0.101 (released 2025-08-16), hosted in the repository, licensed under "Apache-2.0 OR MIT" and only modified to add the SPDX license -identifiers and to remove the `unicode-ident` dependency. +identifiers, to remove the `unicode-ident` dependency, and to build +with 1.85 with nightly features enabled. For copyright details, please see: diff --git a/rust/proc-macro2/probe/proc_macro_span.rs b/rust/proc-macro2/probe/proc_macro_span.rs index 892a7eb3e5a0..765bd47dbecd 100644 --- a/rust/proc-macro2/probe/proc_macro_span.rs +++ b/rust/proc-macro2/probe/proc_macro_span.rs @@ -10,7 +10,6 @@ extern crate proc_macro; use core::ops::{Range, RangeBounds}; use proc_macro::{Literal, Span}; -use std::path::PathBuf; pub fn byte_range(this: &Span) -> Range { this.byte_range() @@ -32,14 +31,6 @@ pub fn column(this: &Span) -> usize { this.column() } -pub fn file(this: &Span) -> String { - this.file() -} - -pub fn local_file(this: &Span) -> Option { - this.local_file() -} - pub fn join(this: &Span, other: Span) -> Option { this.join(other) }