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

Configure Feed

Select the types of activity you want to include in your feed.

rust: syn: 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 `syn` 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-17-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+110
+2
rust/syn/attr.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::error::Error; 3 5 #[cfg(feature = "parsing")]
+2
rust/syn/bigint.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use std::ops::{AddAssign, MulAssign}; 2 4 3 5 // For implementing base10_digits() accessor on LitInt.
+2
rust/syn/buffer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! A stably addressed token buffer supporting efficient traversal based on a 2 4 //! cheaply copyable cursor. 3 5
+2
rust/syn/classify.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "full")] 2 4 use crate::expr::Expr; 3 5 #[cfg(any(feature = "printing", feature = "full"))]
+2
rust/syn/custom_keyword.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 /// Define a type that supports parsing and printing a given identifier as if it 2 4 /// were a keyword. 3 5 ///
+2
rust/syn/custom_punctuation.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 /// Define a type that supports parsing and printing a multi-character symbol 2 4 /// as if it were a punctuation token. 3 5 ///
+2
rust/syn/data.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::expr::{Expr, Index, Member}; 3 5 use crate::ident::Ident;
+2
rust/syn/derive.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::data::{Fields, FieldsNamed, Variant}; 3 5 use crate::generics::Generics;
+2
rust/syn/discouraged.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! Extensions to the parsing API with niche applicability. 2 4 3 5 use crate::buffer::Cursor;
+2
rust/syn/drops.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use std::iter; 2 4 use std::mem::ManuallyDrop; 3 5 use std::ops::{Deref, DerefMut};
+2
rust/syn/error.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::buffer::Cursor; 3 5 use crate::thread::ThreadBound;
+2
rust/syn/export.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[doc(hidden)] 2 4 pub use std::clone::Clone; 3 5 #[doc(hidden)]
+2
rust/syn/expr.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 #[cfg(all(feature = "parsing", feature = "full"))] 3 5 use crate::error::Result;
+2
rust/syn/ext.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! Extension traits to provide parsing methods on foreign types. 2 4 3 5 use crate::buffer::Cursor;
+2
rust/syn/file.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::item::Item; 3 5
+2
rust/syn/fixup.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::classify; 2 4 use crate::expr::Expr; 3 5 #[cfg(feature = "full")]
+2
rust/syn/gen/clone.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/gen/debug.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/gen/eq.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/gen/fold.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/gen/hash.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/gen/visit.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/gen/visit_mut.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 // This file is @generated by syn-internal-codegen. 2 4 // It is not intended for manual editing. 3 5
+2
rust/syn/generics.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::expr::Expr; 3 5 use crate::ident::Ident;
+2
rust/syn/group.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::error::Result; 2 4 use crate::parse::ParseBuffer; 3 5 use crate::token;
+2
rust/syn/ident.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::lookahead; 3 5
+2
rust/syn/item.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::data::{Fields, FieldsNamed, Variant}; 3 5 use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput};
+2
rust/syn/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! [![github]](https://github.com/dtolnay/syn)&ensp;[![crates-io]](https://crates.io/crates/syn)&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/syn/lifetime.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::lookahead; 3 5 use proc_macro2::{Ident, Span};
+2
rust/syn/lit.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::lookahead; 3 5 #[cfg(feature = "parsing")]
+2
rust/syn/lookahead.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::buffer::Cursor; 2 4 use crate::error::{self, Error}; 3 5 use crate::sealed::lookahead::Sealed;
+2
rust/syn/mac.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::error::Result; 3 5 #[cfg(feature = "parsing")]
+2
rust/syn/macros.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg_attr( 2 4 not(any(feature = "full", feature = "derive")), 3 5 allow(unknown_lints, unused_macro_rules)
+2
rust/syn/meta.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! Facility for interpreting structured content inside of an `Attribute`. 2 4 3 5 use crate::error::{Error, Result};
+2
rust/syn/op.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 ast_enum! { 2 4 /// A binary operator: `+`, `+=`, `&`. 3 5 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
+2
rust/syn/parse.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! Parsing interface for parsing a token stream into a syntax tree node. 2 4 //! 3 5 //! Parsing in Syn is built on parser functions that take in a [`ParseStream`]
+2
rust/syn/parse_macro_input.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 /// Parse the input TokenStream of a macro, triggering a compile error if the 2 4 /// tokens fail to parse. 3 5 ///
+2
rust/syn/parse_quote.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 /// Quasi-quotation macro that accepts input like the [`quote!`] macro but uses 2 4 /// type inference to figure out a return type for those tokens. 3 5 ///
+2
rust/syn/pat.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::expr::Member; 3 5 use crate::ident::Ident;
+2
rust/syn/path.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 use crate::error::Result; 3 5 use crate::expr::Expr;
+2
rust/syn/precedence.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(all(feature = "printing", feature = "full"))] 2 4 use crate::attr::{AttrStyle, Attribute}; 3 5 #[cfg(feature = "printing")]
+2
rust/syn/print.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use proc_macro2::TokenStream; 2 4 use quote::ToTokens; 3 5
+2
rust/syn/punctuated.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! A punctuated sequence of syntax tree nodes separated by punctuation. 2 4 //! 3 5 //! Lots of things in Rust are punctuated sequences.
+2
rust/syn/restriction.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::path::Path; 2 4 use crate::token; 3 5
+2
rust/syn/scan_expr.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use self::{Action::*, Input::*}; 2 4 use proc_macro2::{Delimiter, Ident, Spacing, TokenTree}; 3 5 use syn::parse::{ParseStream, Result};
+2
rust/syn/sealed.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 #[cfg(feature = "parsing")] 2 4 pub(crate) mod lookahead { 3 5 pub trait Sealed: Copy {}
+2
rust/syn/span.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use proc_macro2::extra::DelimSpan; 2 4 use proc_macro2::{Delimiter, Group, Span, TokenStream}; 3 5
+2
rust/syn/spanned.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! A trait that can provide the `Span` of the complete contents of a syntax 2 4 //! tree node. 3 5 //!
+2
rust/syn/stmt.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::expr::Expr; 3 5 use crate::item::Item;
+2
rust/syn/thread.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use std::fmt::{self, Debug}; 2 4 use std::thread::{self, ThreadId}; 3 5
+2
rust/syn/token.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 //! Tokens representing Rust punctuation, keywords, and delimiters. 2 4 //! 3 5 //! The type names in this module can be difficult to keep straight, so we
+2
rust/syn/tt.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use proc_macro2::{Delimiter, TokenStream, TokenTree}; 2 4 use std::hash::{Hash, Hasher}; 3 5
+2
rust/syn/ty.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::attr::Attribute; 2 4 use crate::expr::Expr; 3 5 use crate::generics::{BoundLifetimes, TypeParamBound};
+2
rust/syn/verbatim.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 use crate::parse::ParseStream; 2 4 use proc_macro2::{Delimiter, TokenStream}; 3 5 use std::cmp::Ordering;
+2
rust/syn/whitespace.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 OR MIT 2 + 1 3 pub(crate) fn skip(mut s: &str) -> &str { 2 4 'skip: while !s.is_empty() { 3 5 let byte = s.as_bytes()[0];