summaryrefslogtreecommitdiffstats
path: root/vendor/syn/tests/test_path.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_path.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_path.rs')
-rw-r--r--vendor/syn/tests/test_path.rs38
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,
+ ),
+ },
+ },
+ ],
},
- ],
- },
+ }),
+ ],
}
"###);
}