a15800a327
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.
19 lines
260 B
Rust
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>;
|
|
}
|