Skip to content

Commit aa3ac27

Browse files
committed
merge rustc history
2 parents e5a0426 + 7cc303f commit aa3ac27

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/config/config_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::config::options::{IgnoreList, WidthHeuristics};
44
/// Trait for types that can be used in `Config`.
55
pub(crate) trait ConfigType: Sized {
66
/// Returns hint text for use in `Config::print_docs()`. For enum types, this is a
7-
/// pipe-separated list of variants; for other types it returns "<type>".
7+
/// pipe-separated list of variants; for other types it returns `<type>`.
88
fn doc_hint() -> String;
99
}
1010

src/items.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ impl<'a> FmtVisitor<'a> {
594594
let both_type = |l: &TyOpt, r: &TyOpt| is_type(l) && is_type(r);
595595
let both_opaque = |l: &TyOpt, r: &TyOpt| is_opaque(l) && is_opaque(r);
596596
let need_empty_line = |a: &ast::AssocItemKind, b: &ast::AssocItemKind| match (a, b) {
597-
(TyAlias(lty), TyAlias(rty))
597+
(Type(lty), Type(rty))
598598
if both_type(&lty.ty, &rty.ty) || both_opaque(&lty.ty, &rty.ty) =>
599599
{
600600
false
@@ -612,7 +612,7 @@ impl<'a> FmtVisitor<'a> {
612612
}
613613

614614
buffer.sort_by(|(_, a), (_, b)| match (&a.kind, &b.kind) {
615-
(TyAlias(lty), TyAlias(rty))
615+
(Type(lty), Type(rty))
616616
if both_type(&lty.ty, &rty.ty) || both_opaque(&lty.ty, &rty.ty) =>
617617
{
618618
a.ident.as_str().cmp(b.ident.as_str())
@@ -621,10 +621,10 @@ impl<'a> FmtVisitor<'a> {
621621
a.ident.as_str().cmp(b.ident.as_str())
622622
}
623623
(Fn(..), Fn(..)) => a.span.lo().cmp(&b.span.lo()),
624-
(TyAlias(ty), _) if is_type(&ty.ty) => Ordering::Less,
625-
(_, TyAlias(ty)) if is_type(&ty.ty) => Ordering::Greater,
626-
(TyAlias(..), _) => Ordering::Less,
627-
(_, TyAlias(..)) => Ordering::Greater,
624+
(Type(ty), _) if is_type(&ty.ty) => Ordering::Less,
625+
(_, Type(ty)) if is_type(&ty.ty) => Ordering::Greater,
626+
(Type(..), _) => Ordering::Less,
627+
(_, Type(..)) => Ordering::Greater,
628628
(Const(..), _) => Ordering::Less,
629629
(_, Const(..)) => Ordering::Greater,
630630
(MacCall(..), _) => Ordering::Less,

src/visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
660660
self.push_rewrite(ai.span, rewrite);
661661
}
662662
}
663-
(ast::AssocItemKind::TyAlias(ref ty_alias), _) => {
663+
(ast::AssocItemKind::Type(ref ty_alias), _) => {
664664
self.visit_ty_alias_kind(ty_alias, visitor_kind, ai.span);
665665
}
666666
(ast::AssocItemKind::MacCall(ref mac), _) => {

0 commit comments

Comments
 (0)