提交 121974e3 编写于 作者: J Joshua Nelson

xpy fmt

上级 219e93d9
......@@ -3,11 +3,11 @@
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::attr;
use rustc_ast::util::comments::beautify_doc_string;
......@@ -27,7 +27,7 @@
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;
......@@ -1296,8 +1296,9 @@ pub fn as_str(&self) -> &'static str {
}
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! {
......
......@@ -275,7 +275,12 @@ fn resolve(
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册