Type::BorrowedRef { lifetime, mutability, type_ } => {
Type::BorrowedRef { lifetime, mutability, type_: Box::new(strip_type(*type_)) }
}
- Type::QPath { name, self_type, trait_ } => Type::QPath {
+ Type::QPath { name, self_type, trait_, self_def_id } => Type::QPath {
name,
+ self_def_id,
self_type: Box::new(strip_type(*self_type)),
trait_: Box::new(strip_type(*trait_)),
},
&& attr.meta_item_list().map_or(false, |l| rustc_attr::list_contains_name(&l, flag))
})
}
-
-/// Return a channel suitable for using in a `doc.rust-lang.org/{channel}` format string.
-crate fn doc_rust_lang_org_channel() -> &'static str {
- match env!("CFG_RELEASE_CHANNEL") {
- "stable" => env!("CFG_RELEASE_NUM"),
- "beta" => "beta",
- "nightly" | "dev" => "nightly",
- // custom build of rustdoc maybe? link to the stable docs just in case
- _ => "",
- }
-}