]> git.lizzy.rs Git - rust.git/blob - tests/ui/empty-type-parameter-list.rs
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / empty-type-parameter-list.rs
1 // run-pass
2 // Test that empty type parameter list (<>) is synonymous with
3 // no type parameters at all
4
5 struct S<>;
6 trait T<> {}
7 enum E<> { V }
8 impl<> T<> for S<> {}
9 impl T for E {}
10 fn foo<>() {}
11 fn bar() {}
12
13 fn main() {
14     let _ = S;
15     let _ = S::<>;
16     let _ = E::V;
17     let _ = E::<>::V;
18     foo();
19     foo::<>();
20
21     // Test that we can supply <> to non generic things
22     bar::<>();
23     let _: i32<>;
24 }