Skip to content

Commit

Permalink
Add regression test for issue 974
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 9, 2021
1 parent 78f78ab commit e39fca3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_item.rs
Expand Up @@ -241,3 +241,28 @@ fn test_supertraits() {
}
"###);
}

#[test]
fn test_type_empty_bounds() {
#[rustfmt::skip]
let tokens = quote! {
trait Foo {
type Bar: ;
}
};

snapshot!(tokens as ItemTrait, @r###"
ItemTrait {
vis: Inherited,
ident: "Foo",
generics: Generics,
items: [
TraitItem::Type {
ident: "Bar",
generics: Generics,
colon_token: Some,
},
],
}
"###);
}

0 comments on commit e39fca3

Please sign in to comment.