Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rust: proc-macro2: add SPDX License Identifiers

Originally, when the Rust upstream `alloc` standard library crate was
vendored in commit 057b8d257107 ("rust: adapt `alloc` crate to the
kernel"), the SPDX License Identifiers were added to every file so that
the license on those was clear.

Thus do the same for the `proc-macro2` crate.

This makes `scripts/spdxcheck.py` pass.

Reviewed-by: Gary Guo <gary@garyguo.net>
Tested-by: Gary Guo <gary@garyguo.net>
Tested-by: Jesung Yang <y.j3ms.n@gmail.com>
Link: https://patch.msgid.link/20251124151837.2184382-8-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+26
+2
rust/proc-macro2/detection.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use core::sync::atomic::{AtomicUsize, Ordering}; 2 4 use std::sync::Once; 3 5
+2
rust/proc-macro2/extra.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! Items which do not have a correspondence to any API in the proc_macro crate, 2 4 //! but are necessary to include in proc-macro2. 3 5
+2
rust/proc-macro2/fallback.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(wrap_proc_macro)] 2 4 use crate::imp; 3 5 #[cfg(span_locations)]
+2
rust/proc-macro2/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! [![github]](https://github.com/dtolnay/proc-macro2)&ensp;[![crates-io]](https://crates.io/crates/proc-macro2)&ensp;[![docs-rs]](crate) 2 4 //! 3 5 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
+2
rust/proc-macro2/location.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use core::cmp::Ordering; 2 4 3 5 /// A line-column pair representing the start or end of a `Span`.
+2
rust/proc-macro2/marker.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use alloc::rc::Rc; 2 4 use core::marker::PhantomData; 3 5 use core::panic::{RefUnwindSafe, UnwindSafe};
+2
rust/proc-macro2/parse.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::fallback::{ 2 4 self, is_ident_continue, is_ident_start, Group, Ident, LexError, Literal, Span, TokenStream, 3 5 TokenStreamBuilder,
+2
rust/proc-macro2/probe.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #![allow(dead_code)] 2 4 3 5 #[cfg(proc_macro_span)]
+2
rust/proc-macro2/probe/proc_macro_span.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This code exercises the surface area that we expect of Span's unstable API. 2 4 // If the current toolchain is able to compile it, then proc-macro2 is able to 3 5 // offer these APIs too.
+2
rust/proc-macro2/probe/proc_macro_span_file.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // The subset of Span's API stabilized in Rust 1.88. 2 4 3 5 extern crate proc_macro;
+2
rust/proc-macro2/probe/proc_macro_span_location.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // The subset of Span's API stabilized in Rust 1.88. 2 4 3 5 extern crate proc_macro;
+2
rust/proc-macro2/rcvec.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use alloc::rc::Rc; 2 4 use alloc::vec; 3 5 use core::mem;
+2
rust/proc-macro2/wrapper.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::detection::inside_proc_macro; 2 4 use crate::fallback::{self, FromStr2 as _}; 3 5 #[cfg(span_locations)]