xpy fmt
This commit is contained in:
parent
219e93d91e
commit
121974e37d
@ -3,11 +3,11 @@ use std::default::Default;
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::iter::FromIterator;
|
use std::iter::FromIterator;
|
||||||
|
use std::lazy::SyncOnceCell as OnceCell;
|
||||||
use std::num::NonZeroU32;
|
use std::num::NonZeroU32;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{slice, vec};
|
use std::{slice, vec};
|
||||||
use std::lazy::SyncOnceCell as OnceCell;
|
|
||||||
|
|
||||||
use rustc_ast::attr;
|
use rustc_ast::attr;
|
||||||
use rustc_ast::util::comments::beautify_doc_string;
|
use rustc_ast::util::comments::beautify_doc_string;
|
||||||
@ -27,7 +27,7 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
|||||||
use rustc_span::{self, FileName};
|
use rustc_span::{self, FileName};
|
||||||
use rustc_target::abi::VariantIdx;
|
use rustc_target::abi::VariantIdx;
|
||||||
use rustc_target::spec::abi::Abi;
|
use rustc_target::spec::abi::Abi;
|
||||||
use smallvec::{SmallVec, smallvec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
|
||||||
use crate::clean::cfg::Cfg;
|
use crate::clean::cfg::Cfg;
|
||||||
use crate::clean::external_path;
|
use crate::clean::external_path;
|
||||||
@ -1296,8 +1296,9 @@ impl PrimitiveType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let single = |a: Option<DefId>| a.into_iter().collect();
|
let single = |a: Option<DefId>| a.into_iter().collect();
|
||||||
let both =
|
let both = |a: Option<DefId>, b: Option<DefId>| -> SmallVec<_> {
|
||||||
|a: Option<DefId>, b: Option<DefId>| -> SmallVec<_> { a.into_iter().chain(b).collect() };
|
a.into_iter().chain(b).collect()
|
||||||
|
};
|
||||||
|
|
||||||
let lang_items = tcx.lang_items();
|
let lang_items = tcx.lang_items();
|
||||||
map! {
|
map! {
|
||||||
|
@ -275,7 +275,12 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
|
|||||||
let link = cx
|
let link = cx
|
||||||
.tcx
|
.tcx
|
||||||
.associated_items(impl_)
|
.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 {
|
.and_then(|item| match item.kind {
|
||||||
ty::AssocKind::Fn => Some("method"),
|
ty::AssocKind::Fn => Some("method"),
|
||||||
_ => None,
|
_ => None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user