diff options
Diffstat (limited to 'vendor/syn/tests/test_path.rs')
-rw-r--r-- | vendor/syn/tests/test_path.rs | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/vendor/syn/tests/test_path.rs b/vendor/syn/tests/test_path.rs index c732eff70..6aded74e6 100644 --- a/vendor/syn/tests/test_path.rs +++ b/vendor/syn/tests/test_path.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, ToTokens}; -use std::iter::FromIterator; use syn::{parse_quote, Expr, Type, TypePath}; #[test] @@ -22,11 +23,9 @@ fn parse_interpolated_leading_component() { segments: [ PathSegment { ident: "first", - arguments: None, }, PathSegment { ident: "rest", - arguments: None, }, ], }, @@ -39,11 +38,9 @@ fn parse_interpolated_leading_component() { segments: [ PathSegment { ident: "first", - arguments: None, }, PathSegment { ident: "rest", - arguments: None, }, ], }, @@ -106,21 +103,26 @@ fn print_incomplete_qpath() { #[test] fn parse_parenthesized_path_arguments_with_disambiguator() { #[rustfmt::skip] - let tokens = quote!(FnOnce::() -> !); + let tokens = quote!(dyn FnOnce::() -> !); snapshot!(tokens as Type, @r###" - Type::Path { - path: Path { - segments: [ - PathSegment { - ident: "FnOnce", - arguments: PathArguments::Parenthesized { - output: Type( - Type::Never, - ), - }, + Type::TraitObject { + dyn_token: Some, + bounds: [ + TypeParamBound::Trait(TraitBound { + path: Path { + segments: [ + PathSegment { + ident: "FnOnce", + arguments: PathArguments::Parenthesized { + output: ReturnType::Type( + Type::Never, + ), + }, + }, + ], }, - ], - }, + }), + ], } "###); } |