Skip to content

Commit e39fca3

Browse files
committed
Add regression test for issue 974
1 parent 78f78ab commit e39fca3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test_item.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,28 @@ fn test_supertraits() {
241241
}
242242
"###);
243243
}
244+
245+
#[test]
246+
fn test_type_empty_bounds() {
247+
#[rustfmt::skip]
248+
let tokens = quote! {
249+
trait Foo {
250+
type Bar: ;
251+
}
252+
};
253+
254+
snapshot!(tokens as ItemTrait, @r###"
255+
ItemTrait {
256+
vis: Inherited,
257+
ident: "Foo",
258+
generics: Generics,
259+
items: [
260+
TraitItem::Type {
261+
ident: "Bar",
262+
generics: Generics,
263+
colon_token: Some,
264+
},
265+
],
266+
}
267+
"###);
268+
}

0 commit comments

Comments
 (0)