mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-23 16:00:10 +00:00
Add test of trailing comma after mut self
Currently fails with: ---- test_mut_self stdout ---- thread 'test_mut_self' panicked at 'Punctuated::push_punct: cannot push punctuation if Punctuated is empty or already has trailing punctuation', src/punctuated.rs:181:9
This commit is contained in:
parent
9a669977be
commit
99510ff0c3
@ -9,6 +9,7 @@ use syn::Type;
|
||||
#[test]
|
||||
fn test_mut_self() {
|
||||
syn::parse_str::<Type>("fn(mut self)").unwrap();
|
||||
syn::parse_str::<Type>("fn(mut self,)").unwrap();
|
||||
syn::parse_str::<Type>("fn(mut self: ())").unwrap();
|
||||
syn::parse_str::<Type>("fn(mut self: ...)").unwrap_err();
|
||||
syn::parse_str::<Type>("fn(mut self: mut self)").unwrap_err();
|
||||
|
Loading…
Reference in New Issue
Block a user