mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
fixup! Preserve and format type aliases in extern blocks
This commit is contained in:
parent
a15800a327
commit
a9b0b057eb
@ -1862,6 +1862,9 @@ pub(crate) fn rewrite_type_alias(
|
||||
let lhs = format!("{}=", prefix);
|
||||
rewrite_assign_rhs(context, lhs, &**ty, shape).map(|s| s + ";")
|
||||
} else {
|
||||
if !generics.where_clause.predicates.is_empty() {
|
||||
prefix.push_str(&indent.to_string_with_newline(context.config));
|
||||
}
|
||||
Some(format!("{};", prefix))
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,13 @@ extern "C" {
|
||||
|
||||
type A<'a>
|
||||
where
|
||||
'a: 'static,;
|
||||
'a: 'static,
|
||||
;
|
||||
|
||||
type A<T: Ord>
|
||||
where
|
||||
T: 'static,;
|
||||
T: 'static,
|
||||
;
|
||||
|
||||
type A = u8;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user