Skip to content

Commit 2073f97

Browse files
committed
rust: proc-macro2: add SPDX License Identifiers
Originally, when the Rust upstream `alloc` standard library crate was vendored in commit 057b8d2 ("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. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent db7d73f commit 2073f97

File tree

13 files changed

+26
-0
lines changed

13 files changed

+26
-0
lines changed

rust/proc-macro2/detection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use core::sync::atomic::{AtomicUsize, Ordering};
24
use std::sync::Once;
35

rust/proc-macro2/extra.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! Items which do not have a correspondence to any API in the proc_macro crate,
24
//! but are necessary to include in proc-macro2.
35

rust/proc-macro2/fallback.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
#[cfg(wrap_proc_macro)]
24
use crate::imp;
35
#[cfg(span_locations)]

rust/proc-macro2/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! [![github]](https://github.com/dtolnay/proc-macro2)&ensp;[![crates-io]](https://crates.io/crates/proc-macro2)&ensp;[![docs-rs]](crate)
24
//!
35
//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github

rust/proc-macro2/location.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use core::cmp::Ordering;
24

35
/// A line-column pair representing the start or end of a `Span`.

rust/proc-macro2/marker.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use alloc::rc::Rc;
24
use core::marker::PhantomData;
35
use core::panic::{RefUnwindSafe, UnwindSafe};

rust/proc-macro2/parse.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::fallback::{
24
self, is_ident_continue, is_ident_start, Group, Ident, LexError, Literal, Span, TokenStream,
35
TokenStreamBuilder,

rust/proc-macro2/probe.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
#![allow(dead_code)]
24

35
#[cfg(proc_macro_span)]

rust/proc-macro2/probe/proc_macro_span.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
// This code exercises the surface area that we expect of Span's unstable API.
24
// If the current toolchain is able to compile it, then proc-macro2 is able to
35
// offer these APIs too.

rust/proc-macro2/probe/proc_macro_span_file.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
// The subset of Span's API stabilized in Rust 1.88.
24

35
extern crate proc_macro;

0 commit comments

Comments
 (0)