mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2025-02-17 05:57:30 +00:00
Add test for parenthesized path arguments with disambiguator
Currently fails with: ---- parse_parenthesized_path_arguments_with_disambiguator stdout ---- thread 'parse_parenthesized_path_arguments_with_disambiguator' panicked at 'called `Result::unwrap()` on an `Err` value: Error("expected identifier")', tests/test_path.rs:110:5
This commit is contained in:
parent
c859588bdb
commit
8648f5a6a6
@ -102,3 +102,25 @@ fn print_incomplete_qpath() {
|
||||
"###);
|
||||
assert!(ty.path.segments.pop().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_parenthesized_path_arguments_with_disambiguator() {
|
||||
#[rustfmt::skip]
|
||||
let tokens = quote!(FnOnce::() -> !);
|
||||
snapshot!(tokens as Type, @r###"
|
||||
Type::Path {
|
||||
path: Path {
|
||||
segments: [
|
||||
PathSegment {
|
||||
ident: "FnOnce",
|
||||
arguments: PathArguments::Parenthesized {
|
||||
output: Type(
|
||||
Type::Never,
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user