diff options
55 files changed, 110 insertions, 0 deletions
diff --git a/rust/syn/attr.rs b/rust/syn/attr.rs index 2bdf96ee7fa932..020b31f9de22c1 100644 --- a/rust/syn/attr.rs +++ b/rust/syn/attr.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::error::Error; #[cfg(feature = "parsing")] diff --git a/rust/syn/bigint.rs b/rust/syn/bigint.rs index 66aaa93725401a..d706f9f515e9ca 100644 --- a/rust/syn/bigint.rs +++ b/rust/syn/bigint.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use std::ops::{AddAssign, MulAssign}; // For implementing base10_digits() accessor on LitInt. diff --git a/rust/syn/buffer.rs b/rust/syn/buffer.rs index 7b6a504eeb7c95..406f70db323c1f 100644 --- a/rust/syn/buffer.rs +++ b/rust/syn/buffer.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! A stably addressed token buffer supporting efficient traversal based on a //! cheaply copyable cursor. diff --git a/rust/syn/classify.rs b/rust/syn/classify.rs index 8eab19dbc37cac..92a975bfe4aa67 100644 --- a/rust/syn/classify.rs +++ b/rust/syn/classify.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "full")] use crate::expr::Expr; #[cfg(any(feature = "printing", feature = "full"))] diff --git a/rust/syn/custom_keyword.rs b/rust/syn/custom_keyword.rs index cc4f632c981a97..ff2c415f1aabc1 100644 --- a/rust/syn/custom_keyword.rs +++ b/rust/syn/custom_keyword.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + /// Define a type that supports parsing and printing a given identifier as if it /// were a keyword. /// diff --git a/rust/syn/custom_punctuation.rs b/rust/syn/custom_punctuation.rs index eef5f54584594f..d37c0e9c3a1ed4 100644 --- a/rust/syn/custom_punctuation.rs +++ b/rust/syn/custom_punctuation.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + /// Define a type that supports parsing and printing a multi-character symbol /// as if it were a punctuation token. /// diff --git a/rust/syn/data.rs b/rust/syn/data.rs index 96db2a0b7c6fff..c32c1366c1db3e 100644 --- a/rust/syn/data.rs +++ b/rust/syn/data.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::expr::{Expr, Index, Member}; use crate::ident::Ident; diff --git a/rust/syn/derive.rs b/rust/syn/derive.rs index 3443ecfc05cba6..27fd9f12c88c1a 100644 --- a/rust/syn/derive.rs +++ b/rust/syn/derive.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::data::{Fields, FieldsNamed, Variant}; use crate::generics::Generics; diff --git a/rust/syn/discouraged.rs b/rust/syn/discouraged.rs index c8d6bfe89a14ad..2acd631ece84fb 100644 --- a/rust/syn/discouraged.rs +++ b/rust/syn/discouraged.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! Extensions to the parsing API with niche applicability. use crate::buffer::Cursor; diff --git a/rust/syn/drops.rs b/rust/syn/drops.rs index c54308f02c13d3..2c4ae333dad8eb 100644 --- a/rust/syn/drops.rs +++ b/rust/syn/drops.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use std::iter; use std::mem::ManuallyDrop; use std::ops::{Deref, DerefMut}; diff --git a/rust/syn/error.rs b/rust/syn/error.rs index 63310543a3b430..6fa0faf7f4e4fd 100644 --- a/rust/syn/error.rs +++ b/rust/syn/error.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::buffer::Cursor; use crate::thread::ThreadBound; diff --git a/rust/syn/export.rs b/rust/syn/export.rs index b9ea5c747b75a7..05dad324ba5106 100644 --- a/rust/syn/export.rs +++ b/rust/syn/export.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[doc(hidden)] pub use std::clone::Clone; #[doc(hidden)] diff --git a/rust/syn/expr.rs b/rust/syn/expr.rs index 1e49d9a6633e9f..deb91843660429 100644 --- a/rust/syn/expr.rs +++ b/rust/syn/expr.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; #[cfg(all(feature = "parsing", feature = "full"))] use crate::error::Result; diff --git a/rust/syn/ext.rs b/rust/syn/ext.rs index 5cd79e863a9d01..a9be9af427874e 100644 --- a/rust/syn/ext.rs +++ b/rust/syn/ext.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! Extension traits to provide parsing methods on foreign types. use crate::buffer::Cursor; diff --git a/rust/syn/file.rs b/rust/syn/file.rs index 8956d82eee93f7..ce2d2680ca9a35 100644 --- a/rust/syn/file.rs +++ b/rust/syn/file.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::item::Item; diff --git a/rust/syn/fixup.rs b/rust/syn/fixup.rs index 6d2c3092d54838..79b6d7618bb726 100644 --- a/rust/syn/fixup.rs +++ b/rust/syn/fixup.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::classify; use crate::expr::Expr; #[cfg(feature = "full")] diff --git a/rust/syn/gen/clone.rs b/rust/syn/gen/clone.rs index be2b698422da91..dfb53182e3786d 100644 --- a/rust/syn/gen/clone.rs +++ b/rust/syn/gen/clone.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/gen/debug.rs b/rust/syn/gen/debug.rs index aa42e32c60ede5..d594e57fcf21e6 100644 --- a/rust/syn/gen/debug.rs +++ b/rust/syn/gen/debug.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/gen/eq.rs b/rust/syn/gen/eq.rs index 128e8991eeccfb..79e9691b8c6731 100644 --- a/rust/syn/gen/eq.rs +++ b/rust/syn/gen/eq.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/gen/fold.rs b/rust/syn/gen/fold.rs index 1f0afd31919d9c..0643a72f87caaf 100644 --- a/rust/syn/gen/fold.rs +++ b/rust/syn/gen/fold.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/gen/hash.rs b/rust/syn/gen/hash.rs index 04f23453a11777..fae2197a56107a 100644 --- a/rust/syn/gen/hash.rs +++ b/rust/syn/gen/hash.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/gen/visit.rs b/rust/syn/gen/visit.rs index cd258fcde120a9..a82293c053d693 100644 --- a/rust/syn/gen/visit.rs +++ b/rust/syn/gen/visit.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/gen/visit_mut.rs b/rust/syn/gen/visit_mut.rs index 2bbd6895db7573..08e134b43a92d0 100644 --- a/rust/syn/gen/visit_mut.rs +++ b/rust/syn/gen/visit_mut.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. diff --git a/rust/syn/generics.rs b/rust/syn/generics.rs index 0c77193da04308..9f8df8a155e1f3 100644 --- a/rust/syn/generics.rs +++ b/rust/syn/generics.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::expr::Expr; use crate::ident::Ident; diff --git a/rust/syn/group.rs b/rust/syn/group.rs index 1534ae995dd5ab..57586c58fd9233 100644 --- a/rust/syn/group.rs +++ b/rust/syn/group.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::error::Result; use crate::parse::ParseBuffer; use crate::token; diff --git a/rust/syn/ident.rs b/rust/syn/ident.rs index 8a8e8a50d9b0bf..2c4b56505bec3a 100644 --- a/rust/syn/ident.rs +++ b/rust/syn/ident.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::lookahead; diff --git a/rust/syn/item.rs b/rust/syn/item.rs index 1716f5137afb8d..1ab10cf218a6d2 100644 --- a/rust/syn/item.rs +++ b/rust/syn/item.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::data::{Fields, FieldsNamed, Variant}; use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput}; diff --git a/rust/syn/lib.rs b/rust/syn/lib.rs index 79dc9e7c3324cd..b0006fd30b0859 100644 --- a/rust/syn/lib.rs +++ b/rust/syn/lib.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! [![github]](https://github.com/dtolnay/syn) [![crates-io]](https://crates.io/crates/syn) [![docs-rs]](crate) //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github diff --git a/rust/syn/lifetime.rs b/rust/syn/lifetime.rs index cc189d1ac91fd4..24bec7fe969d28 100644 --- a/rust/syn/lifetime.rs +++ b/rust/syn/lifetime.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::lookahead; use proc_macro2::{Ident, Span}; diff --git a/rust/syn/lit.rs b/rust/syn/lit.rs index 45c26d56fed3b8..1d2d8bdccfb13c 100644 --- a/rust/syn/lit.rs +++ b/rust/syn/lit.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::lookahead; #[cfg(feature = "parsing")] diff --git a/rust/syn/lookahead.rs b/rust/syn/lookahead.rs index da13ffc47a7a93..a7994cb6ae885a 100644 --- a/rust/syn/lookahead.rs +++ b/rust/syn/lookahead.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::buffer::Cursor; use crate::error::{self, Error}; use crate::sealed::lookahead::Sealed; diff --git a/rust/syn/mac.rs b/rust/syn/mac.rs index 15107801cfee02..ce4b022b4d1432 100644 --- a/rust/syn/mac.rs +++ b/rust/syn/mac.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::error::Result; #[cfg(feature = "parsing")] diff --git a/rust/syn/macros.rs b/rust/syn/macros.rs index 167f2cf260a7c7..8676f6492a9cc9 100644 --- a/rust/syn/macros.rs +++ b/rust/syn/macros.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg_attr( not(any(feature = "full", feature = "derive")), allow(unknown_lints, unused_macro_rules) diff --git a/rust/syn/meta.rs b/rust/syn/meta.rs index ffeeb2629f4f78..2dd138e6dd5560 100644 --- a/rust/syn/meta.rs +++ b/rust/syn/meta.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! Facility for interpreting structured content inside of an `Attribute`. use crate::error::{Error, Result}; diff --git a/rust/syn/op.rs b/rust/syn/op.rs index 575d9faa1273ad..73dada3fae2da9 100644 --- a/rust/syn/op.rs +++ b/rust/syn/op.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + ast_enum! { /// A binary operator: `+`, `+=`, `&`. #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))] diff --git a/rust/syn/parse.rs b/rust/syn/parse.rs index 57531005ac4eb2..c6f6c0eece02a0 100644 --- a/rust/syn/parse.rs +++ b/rust/syn/parse.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! Parsing interface for parsing a token stream into a syntax tree node. //! //! Parsing in Syn is built on parser functions that take in a [`ParseStream`] diff --git a/rust/syn/parse_macro_input.rs b/rust/syn/parse_macro_input.rs index f0660aedd7dff9..2f977754d41c88 100644 --- a/rust/syn/parse_macro_input.rs +++ b/rust/syn/parse_macro_input.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + /// Parse the input TokenStream of a macro, triggering a compile error if the /// tokens fail to parse. /// diff --git a/rust/syn/parse_quote.rs b/rust/syn/parse_quote.rs index 2db20597c43682..7cc7b9b8fd7573 100644 --- a/rust/syn/parse_quote.rs +++ b/rust/syn/parse_quote.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + /// Quasi-quotation macro that accepts input like the [`quote!`] macro but uses /// type inference to figure out a return type for those tokens. /// diff --git a/rust/syn/pat.rs b/rust/syn/pat.rs index 81a2f183f6b9ce..46edd63d5ed8e9 100644 --- a/rust/syn/pat.rs +++ b/rust/syn/pat.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::expr::Member; use crate::ident::Ident; diff --git a/rust/syn/path.rs b/rust/syn/path.rs index d2fcb9bc5d28b4..f2453bea4a3c97 100644 --- a/rust/syn/path.rs +++ b/rust/syn/path.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] use crate::error::Result; use crate::expr::Expr; diff --git a/rust/syn/precedence.rs b/rust/syn/precedence.rs index 1891bfc202fda5..cc4dba24a43314 100644 --- a/rust/syn/precedence.rs +++ b/rust/syn/precedence.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(all(feature = "printing", feature = "full"))] use crate::attr::{AttrStyle, Attribute}; #[cfg(feature = "printing")] diff --git a/rust/syn/print.rs b/rust/syn/print.rs index 07409932677bba..d73262cda06052 100644 --- a/rust/syn/print.rs +++ b/rust/syn/print.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use proc_macro2::TokenStream; use quote::ToTokens; diff --git a/rust/syn/punctuated.rs b/rust/syn/punctuated.rs index ebaaa94f9a2609..f79152940db6e2 100644 --- a/rust/syn/punctuated.rs +++ b/rust/syn/punctuated.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! A punctuated sequence of syntax tree nodes separated by punctuation. //! //! Lots of things in Rust are punctuated sequences. diff --git a/rust/syn/restriction.rs b/rust/syn/restriction.rs index 6e6758f3cd7369..b844f64c3a7360 100644 --- a/rust/syn/restriction.rs +++ b/rust/syn/restriction.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::path::Path; use crate::token; diff --git a/rust/syn/scan_expr.rs b/rust/syn/scan_expr.rs index 3d88cf06acea13..a5fd1ddc1501d9 100644 --- a/rust/syn/scan_expr.rs +++ b/rust/syn/scan_expr.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use self::{Action::*, Input::*}; use proc_macro2::{Delimiter, Ident, Spacing, TokenTree}; use syn::parse::{ParseStream, Result}; diff --git a/rust/syn/sealed.rs b/rust/syn/sealed.rs index dc804742d12db0..541df962375562 100644 --- a/rust/syn/sealed.rs +++ b/rust/syn/sealed.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + #[cfg(feature = "parsing")] pub(crate) mod lookahead { pub trait Sealed: Copy {} diff --git a/rust/syn/span.rs b/rust/syn/span.rs index eb2779479aaac5..e6d55b3ccd039a 100644 --- a/rust/syn/span.rs +++ b/rust/syn/span.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use proc_macro2::extra::DelimSpan; use proc_macro2::{Delimiter, Group, Span, TokenStream}; diff --git a/rust/syn/spanned.rs b/rust/syn/spanned.rs index 17b69e9f5b2847..fcc93699f74225 100644 --- a/rust/syn/spanned.rs +++ b/rust/syn/spanned.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! A trait that can provide the `Span` of the complete contents of a syntax //! tree node. //! diff --git a/rust/syn/stmt.rs b/rust/syn/stmt.rs index 8ea0077f63dff3..029171a98dca67 100644 --- a/rust/syn/stmt.rs +++ b/rust/syn/stmt.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::expr::Expr; use crate::item::Item; diff --git a/rust/syn/thread.rs b/rust/syn/thread.rs index b33d248afc6063..4165a173d9e1a9 100644 --- a/rust/syn/thread.rs +++ b/rust/syn/thread.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use std::fmt::{self, Debug}; use std::thread::{self, ThreadId}; diff --git a/rust/syn/token.rs b/rust/syn/token.rs index 752c188883cb85..18345cc5831abd 100644 --- a/rust/syn/token.rs +++ b/rust/syn/token.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + //! Tokens representing Rust punctuation, keywords, and delimiters. //! //! The type names in this module can be difficult to keep straight, so we diff --git a/rust/syn/tt.rs b/rust/syn/tt.rs index 7d5d6a1ac32602..fc7adec3da90c8 100644 --- a/rust/syn/tt.rs +++ b/rust/syn/tt.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use proc_macro2::{Delimiter, TokenStream, TokenTree}; use std::hash::{Hash, Hasher}; diff --git a/rust/syn/ty.rs b/rust/syn/ty.rs index c093f5877b3c9f..ae660d2d2e7468 100644 --- a/rust/syn/ty.rs +++ b/rust/syn/ty.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::attr::Attribute; use crate::expr::Expr; use crate::generics::{BoundLifetimes, TypeParamBound}; diff --git a/rust/syn/verbatim.rs b/rust/syn/verbatim.rs index 54dc1cfa0d82ff..97bc08f70afed2 100644 --- a/rust/syn/verbatim.rs +++ b/rust/syn/verbatim.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + use crate::parse::ParseStream; use proc_macro2::{Delimiter, TokenStream}; use std::cmp::Ordering; diff --git a/rust/syn/whitespace.rs b/rust/syn/whitespace.rs index a50b5069a68b92..b7319bd7af181b 100644 --- a/rust/syn/whitespace.rs +++ b/rust/syn/whitespace.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + pub(crate) fn skip(mut s: &str) -> &str { 'skip: while !s.is_empty() { let byte = s.as_bytes()[0]; |
