summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/src/items.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/rustfmt/src/items.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/rustfmt/src/items.rs b/src/tools/rustfmt/src/items.rs
index 8f35068e3..a2a73f0a5 100644
--- a/src/tools/rustfmt/src/items.rs
+++ b/src/tools/rustfmt/src/items.rs
@@ -594,7 +594,7 @@ impl<'a> FmtVisitor<'a> {
let both_type = |l: &TyOpt, r: &TyOpt| is_type(l) && is_type(r);
let both_opaque = |l: &TyOpt, r: &TyOpt| is_opaque(l) && is_opaque(r);
let need_empty_line = |a: &ast::AssocItemKind, b: &ast::AssocItemKind| match (a, b) {
- (TyAlias(lty), TyAlias(rty))
+ (Type(lty), Type(rty))
if both_type(&lty.ty, &rty.ty) || both_opaque(&lty.ty, &rty.ty) =>
{
false
@@ -612,7 +612,7 @@ impl<'a> FmtVisitor<'a> {
}
buffer.sort_by(|(_, a), (_, b)| match (&a.kind, &b.kind) {
- (TyAlias(lty), TyAlias(rty))
+ (Type(lty), Type(rty))
if both_type(&lty.ty, &rty.ty) || both_opaque(&lty.ty, &rty.ty) =>
{
a.ident.as_str().cmp(b.ident.as_str())
@@ -621,10 +621,10 @@ impl<'a> FmtVisitor<'a> {
a.ident.as_str().cmp(b.ident.as_str())
}
(Fn(..), Fn(..)) => a.span.lo().cmp(&b.span.lo()),
- (TyAlias(ty), _) if is_type(&ty.ty) => Ordering::Less,
- (_, TyAlias(ty)) if is_type(&ty.ty) => Ordering::Greater,
- (TyAlias(..), _) => Ordering::Less,
- (_, TyAlias(..)) => Ordering::Greater,
+ (Type(ty), _) if is_type(&ty.ty) => Ordering::Less,
+ (_, Type(ty)) if is_type(&ty.ty) => Ordering::Greater,
+ (Type(..), _) => Ordering::Less,
+ (_, Type(..)) => Ordering::Greater,
(Const(..), _) => Ordering::Less,
(_, Const(..)) => Ordering::Greater,
(MacCall(..), _) => Ordering::Less,