Add test of trailing plus on bare (non-dyn) trait object

Currently fails with:

    thread 'test_trailing_plus' panicked at 'called `Result::unwrap()` on
    an `Err` value: Error("unexpected end of input, expected identifier")',
    tests/test_ty.rs:334:5
This commit is contained in:
David Tolnay 2021-10-05 20:47:06 -04:00
parent 97598d1e73
commit 1e79cc1d33
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -328,4 +328,24 @@ fn test_trailing_plus() {
],
}
"###);
#[rustfmt::skip]
let tokens = quote!(Trait +);
snapshot!(tokens as Type, @r###"
Type::TraitObject {
bounds: [
Trait(TraitBound {
modifier: None,
path: Path {
segments: [
PathSegment {
ident: "Trait",
arguments: None,
},
],
},
}),
],
}
"###);
}