Skip to content

Commit

Permalink
Add test of trailing comma after mut self
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dtolnay committed Mar 16, 2022
1 parent 9a66997 commit 99510ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 99510ff

Please sign in to comment.