rust/tests/target/issue-4159.rs
Ayaz Hafiz a15800a327 Preserve and format type aliases in extern blocks
Previously, non-trivial type aliases in extern blocks were dropped by
rustfmt because only the type alias name would be passed to a rewritter.
This commit fixes that by passing all type information (generics,
bounds, and assignments) to a type alias rewritter, and consolidates
`rewrite_type_alias` and `rewrite_associated_type` as one function.
2020-10-01 19:12:22 -05:00

19 lines
260 B
Rust

extern "C" {
type A: Ord;
type A<'a>
where
'a: 'static,;
type A<T: Ord>
where
T: 'static,;
type A = u8;
type A<'a: 'static, T: Ord + 'static>: Eq + PartialEq
where
T: 'static + Copy,
= Vec<u8>;
}