Closed
Description
Stealing this test case: rust-lang/rust#32023
trait T<> {}
should be formatted to trait T {}
to be consistent. That is, the following:
struct S<>;
trait T<> {}
enum E<> { V }
impl<> T<> for S<> {}
impl T for E {}
fn foo<>() {}
fn bar() {}
fn main() {
let _ = S;
let _ = S::<>;
let _ = E::V;
let _ = E::<>::V;
foo();
foo::<>();
// Test that we can supply <> to non generic things
bar::<>();
let _: i32<>;
}
Currently gets transformed to:
struct S;
trait T<> {}
enum E {
V,
}
impl T for S {}
impl T for E {}
fn foo() {}
fn bar() {}
fn main() {
let _ = S;
let _ = S;
let _ = E::V;
let _ = E::V;
foo();
foo();
// Test that we can supply <> to non generic things
bar();
let _: i32;
}
But the second line should be trait T {}
.