Skip to content

Commit

Permalink
xpy fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Aug 17, 2020
1 parent 1b74f04 commit 2858074
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::default::Default;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::iter::FromIterator;
use std::lazy::SyncOnceCell as OnceCell;
use std::num::NonZeroU32;
use std::rc::Rc;
use std::sync::Arc;
use std::{slice, vec};
use std::lazy::SyncOnceCell as OnceCell;

use rustc_ast::ast::{self, AttrStyle};
use rustc_ast::attr;
Expand All @@ -27,7 +27,7 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{self, FileName};
use rustc_target::abi::VariantIdx;
use rustc_target::spec::abi::Abi;
use smallvec::{SmallVec, smallvec};
use smallvec::{smallvec, SmallVec};

use crate::clean::cfg::Cfg;
use crate::clean::external_path;
Expand Down Expand Up @@ -1296,8 +1296,9 @@ impl PrimitiveType {
}

let single = |a: Option<DefId>| a.into_iter().collect();
let both =
|a: Option<DefId>, b: Option<DefId>| -> SmallVec<_> { a.into_iter().chain(b).collect() };
let both = |a: Option<DefId>, b: Option<DefId>| -> SmallVec<_> {
a.into_iter().chain(b).collect()
};

let lang_items = tcx.lang_items();
map! {
Expand Down
7 changes: 6 additions & 1 deletion src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,12 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
let link = cx
.tcx
.associated_items(impl_)
.find_by_name_and_namespace(cx.tcx, Ident::with_dummy_span(item_name), ns, impl_)
.find_by_name_and_namespace(
cx.tcx,
Ident::with_dummy_span(item_name),
ns,
impl_,
)
.and_then(|item| match item.kind {
ty::AssocKind::Fn => Some("method"),
_ => None,
Expand Down

0 comments on commit 2858074

Please sign in to comment.