summaryrefslogtreecommitdiffstats
path: root/vendor/syn/tests/test_ty.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/syn/tests/test_ty.rs
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/syn/tests/test_ty.rs')
-rw-r--r--vendor/syn/tests/test_ty.rs53
1 files changed, 19 insertions, 34 deletions
diff --git a/vendor/syn/tests/test_ty.rs b/vendor/syn/tests/test_ty.rs
index 335cafa2a..a400a7612 100644
--- a/vendor/syn/tests/test_ty.rs
+++ b/vendor/syn/tests/test_ty.rs
@@ -1,9 +1,10 @@
+#![allow(clippy::uninlined_format_args)]
+
#[macro_use]
mod macros;
use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
use quote::quote;
-use std::iter::FromIterator;
use syn::Type;
#[test]
@@ -34,12 +35,11 @@ fn test_macro_variable_type() {
ident: "ty",
arguments: PathArguments::AngleBracketed {
args: [
- Type(Type::Path {
+ GenericArgument::Type(Type::Path {
path: Path {
segments: [
PathSegment {
ident: "T",
- arguments: None,
},
],
},
@@ -71,12 +71,11 @@ fn test_macro_variable_type() {
arguments: PathArguments::AngleBracketed {
colon2_token: Some,
args: [
- Type(Type::Path {
+ GenericArgument::Type(Type::Path {
path: Path {
segments: [
PathSegment {
ident: "T",
- arguments: None,
},
],
},
@@ -108,7 +107,7 @@ fn test_group_angle_brackets() {
ident: "Option",
arguments: PathArguments::AngleBracketed {
args: [
- Type(Type::Group {
+ GenericArgument::Type(Type::Group {
elem: Type::Path {
path: Path {
segments: [
@@ -116,12 +115,11 @@ fn test_group_angle_brackets() {
ident: "Vec",
arguments: PathArguments::AngleBracketed {
args: [
- Type(Type::Path {
+ GenericArgument::Type(Type::Path {
path: Path {
segments: [
PathSegment {
ident: "u8",
- arguments: None,
},
],
},
@@ -160,12 +158,11 @@ fn test_group_colons() {
ident: "Vec",
arguments: PathArguments::AngleBracketed {
args: [
- Type(Type::Path {
+ GenericArgument::Type(Type::Path {
path: Path {
segments: [
PathSegment {
ident: "u8",
- arguments: None,
},
],
},
@@ -175,7 +172,6 @@ fn test_group_colons() {
},
PathSegment {
ident: "Item",
- arguments: None,
},
],
},
@@ -198,7 +194,6 @@ fn test_group_colons() {
segments: [
PathSegment {
ident: "T",
- arguments: None,
},
],
},
@@ -211,7 +206,6 @@ fn test_group_colons() {
segments: [
PathSegment {
ident: "Element",
- arguments: None,
},
],
},
@@ -226,15 +220,14 @@ fn test_trait_object() {
Type::TraitObject {
dyn_token: Some,
bounds: [
- Trait(TraitBound {
- modifier: None,
+ TypeParamBound::Trait(TraitBound {
lifetimes: Some(BoundLifetimes {
lifetimes: [
- LifetimeDef {
+ GenericParam::Lifetime(LifetimeParam {
lifetime: Lifetime {
ident: "a",
},
- },
+ }),
],
}),
path: Path {
@@ -243,7 +236,7 @@ fn test_trait_object() {
ident: "Trait",
arguments: PathArguments::AngleBracketed {
args: [
- Lifetime(Lifetime {
+ GenericArgument::Lifetime(Lifetime {
ident: "a",
}),
],
@@ -252,9 +245,9 @@ fn test_trait_object() {
],
},
}),
- Lifetime(Lifetime {
+ TypeParamBound::Lifetime {
ident: "static",
- }),
+ },
],
}
"###);
@@ -264,16 +257,14 @@ fn test_trait_object() {
Type::TraitObject {
dyn_token: Some,
bounds: [
- Lifetime(Lifetime {
+ TypeParamBound::Lifetime {
ident: "a",
- }),
- Trait(TraitBound {
- modifier: None,
+ },
+ TypeParamBound::Trait(TraitBound {
path: Path {
segments: [
PathSegment {
ident: "Trait",
- arguments: None,
},
],
},
@@ -294,13 +285,11 @@ fn test_trailing_plus() {
snapshot!(tokens as Type, @r###"
Type::ImplTrait {
bounds: [
- Trait(TraitBound {
- modifier: None,
+ TypeParamBound::Trait(TraitBound {
path: Path {
segments: [
PathSegment {
ident: "Trait",
- arguments: None,
},
],
},
@@ -315,13 +304,11 @@ fn test_trailing_plus() {
Type::TraitObject {
dyn_token: Some,
bounds: [
- Trait(TraitBound {
- modifier: None,
+ TypeParamBound::Trait(TraitBound {
path: Path {
segments: [
PathSegment {
ident: "Trait",
- arguments: None,
},
],
},
@@ -335,13 +322,11 @@ fn test_trailing_plus() {
snapshot!(tokens as Type, @r###"
Type::TraitObject {
bounds: [
- Trait(TraitBound {
- modifier: None,
+ TypeParamBound::Trait(TraitBound {
path: Path {
segments: [
PathSegment {
ident: "Trait",
- arguments: None,
},
],
},