]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: proc-macro2: add SPDX License Identifiers
authorMiguel Ojeda <ojeda@kernel.org>
Mon, 24 Nov 2025 15:18:19 +0000 (16:18 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 24 Nov 2025 16:15:39 +0000 (17:15 +0100)
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>
13 files changed:
rust/proc-macro2/detection.rs
rust/proc-macro2/extra.rs
rust/proc-macro2/fallback.rs
rust/proc-macro2/lib.rs
rust/proc-macro2/location.rs
rust/proc-macro2/marker.rs
rust/proc-macro2/parse.rs
rust/proc-macro2/probe.rs
rust/proc-macro2/probe/proc_macro_span.rs
rust/proc-macro2/probe/proc_macro_span_file.rs
rust/proc-macro2/probe/proc_macro_span_location.rs
rust/proc-macro2/rcvec.rs
rust/proc-macro2/wrapper.rs

index beba7b237395698f12e108c5408e23f40b843edb..3de448cb2ddeb279a692f6afc8d848dae7b2135d 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use core::sync::atomic::{AtomicUsize, Ordering};
 use std::sync::Once;
 
index 522a90e136bea48170a32ad7289553b913f85e9a..55feb5ec7526ac05ebb6bc76047c595a9303c4ce 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 //! Items which do not have a correspondence to any API in the proc_macro crate,
 //! but are necessary to include in proc-macro2.
 
index 1560105cfd25225c6f8a7bae1d01fb03cda08d5b..9e005d67f7f554974d5814e2de5ba718ae19bd7a 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 #[cfg(wrap_proc_macro)]
 use crate::imp;
 #[cfg(span_locations)]
index 2984af335adc66970332e416d2f157e159e5c383..7b78d065d51ce8f416af402f2c2b5b9431388734 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 //! [![github]](https://github.com/dtolnay/proc-macro2)&ensp;[![crates-io]](https://crates.io/crates/proc-macro2)&ensp;[![docs-rs]](crate)
 //!
 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
index 7190e2d05255e0eb13bc699bfed401df9b7b3104..3a11871e29439bcf423e491062607941a0849e08 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use core::cmp::Ordering;
 
 /// A line-column pair representing the start or end of a `Span`.
index 23b94ce6fa853e93d32a0179141cdbcc7d80975f..6f322424808c3add2aefaff942d46cdd5d0ae83a 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use alloc::rc::Rc;
 use core::marker::PhantomData;
 use core::panic::{RefUnwindSafe, UnwindSafe};
index b8be403f842f2c2a1cc1bd117caf2cb6251691ad..a005dea1fe888145ca13b1870cc53ca3ce001f8e 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use crate::fallback::{
     self, is_ident_continue, is_ident_start, Group, Ident, LexError, Literal, Span, TokenStream,
     TokenStreamBuilder,
index b67f52036218de56e0d7b954cf577c124a021a42..d68aa8cfd85e477ba0a84868634e7c0ce9ab93c5 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 #![allow(dead_code)]
 
 #[cfg(proc_macro_span)]
index 2d7d44e07708b7144c2b74f86263e8f76d2b24b2..892a7eb3e5a05ef17b9fec3e3d95a82ab7103146 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 // This code exercises the surface area that we expect of Span's unstable API.
 // If the current toolchain is able to compile it, then proc-macro2 is able to
 // offer these APIs too.
index 8b76bdf5007b911881018d8f90fb185f2668bcca..f2dbc4056ebea1ff3c00dbbe440257c9c070af77 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 // The subset of Span's API stabilized in Rust 1.88.
 
 extern crate proc_macro;
index 79da34af54afea6b684b6281df3e75f963cbee9c..ae19c93394fac4230fddc096831a401f537538a6 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 // The subset of Span's API stabilized in Rust 1.88.
 
 extern crate proc_macro;
index 23edc77d597f9172786cae0bd8302bf4f1d6b269..e224ebe277ef7a11650710db2bd25cd0169f7365 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use alloc::rc::Rc;
 use alloc::vec;
 use core::mem;
index 2e3eb5b4d04e285c94aa79e34cccb261452aeb51..6792e9834111d4f96655b780394307808183198b 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use crate::detection::inside_proc_macro;
 use crate::fallback::{self, FromStr2 as _};
 #[cfg(span_locations)]