Rollup merge of #90154 - camelid:remove-getdefid, r=jyn514

rustdoc: Remove `GetDefId`

See the individual commit messages for details.

r? `@jyn514`
This commit is contained in:
Matthias Krüger
2021-10-27 06:11:35 +02:00
committed by GitHub
12 changed files with 70 additions and 100 deletions

View File

@@ -234,7 +234,7 @@ unsafe impl SliceIndex<str> for ops::Range<usize> {
/// Implements substring slicing with syntax `&self[.. end]` or `&mut /// Implements substring slicing with syntax `&self[.. end]` or `&mut
/// self[.. end]`. /// self[.. end]`.
/// ///
/// Returns a slice of the given string from the byte range [`0`, `end`). /// Returns a slice of the given string from the byte range \[0, `end`).
/// Equivalent to `&self[0 .. end]` or `&mut self[0 .. end]`. /// Equivalent to `&self[0 .. end]` or `&mut self[0 .. end]`.
/// ///
/// This operation is *O*(1). /// This operation is *O*(1).
@@ -304,9 +304,8 @@ unsafe impl SliceIndex<str> for ops::RangeTo<usize> {
/// Implements substring slicing with syntax `&self[begin ..]` or `&mut /// Implements substring slicing with syntax `&self[begin ..]` or `&mut
/// self[begin ..]`. /// self[begin ..]`.
/// ///
/// Returns a slice of the given string from the byte range [`begin`, /// Returns a slice of the given string from the byte range \[`begin`, `len`).
/// `len`). Equivalent to `&self[begin .. len]` or `&mut self[begin .. /// Equivalent to `&self[begin .. len]` or `&mut self[begin .. len]`.
/// len]`.
/// ///
/// This operation is *O*(1). /// This operation is *O*(1).
/// ///
@@ -433,7 +432,7 @@ unsafe impl SliceIndex<str> for ops::RangeInclusive<usize> {
/// Implements substring slicing with syntax `&self[..= end]` or `&mut /// Implements substring slicing with syntax `&self[..= end]` or `&mut
/// self[..= end]`. /// self[..= end]`.
/// ///
/// Returns a slice of the given string from the byte range [0, `end`]. /// Returns a slice of the given string from the byte range \[0, `end`\].
/// Equivalent to `&self [0 .. end + 1]`, except if `end` has the maximum /// Equivalent to `&self [0 .. end + 1]`, except if `end` has the maximum
/// value for `usize`. /// value for `usize`.
/// ///

View File

@@ -686,7 +686,7 @@ impl Wtf8 {
} }
} }
/// Returns a slice of the given string for the byte range [`begin`..`end`). /// Returns a slice of the given string for the byte range \[`begin`..`end`).
/// ///
/// # Panics /// # Panics
/// ///

View File

@@ -14,9 +14,7 @@ use rustc_middle::ty::{self, TyCtxt};
use rustc_span::hygiene::MacroKind; use rustc_span::hygiene::MacroKind;
use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::symbol::{kw, sym, Symbol};
use crate::clean::{ use crate::clean::{self, utils, Attributes, AttributesExt, ItemId, NestedAttributesExt, Type};
self, utils, Attributes, AttributesExt, GetDefId, ItemId, NestedAttributesExt, Type,
};
use crate::core::DocContext; use crate::core::DocContext;
use crate::formats::item_type::ItemType; use crate::formats::item_type::ItemType;
@@ -325,7 +323,7 @@ fn merge_attrs(
} }
} }
/// Builds a specific implementation of a type. The `did` could be a type method or trait method. /// Inline an `impl`, inherent or of a trait. The `did` must be for an `impl`.
crate fn build_impl( crate fn build_impl(
cx: &mut DocContext<'_>, cx: &mut DocContext<'_>,
parent_module: impl Into<Option<DefId>>, parent_module: impl Into<Option<DefId>>,
@@ -376,7 +374,7 @@ crate fn build_impl(
// Only inline impl if the implementing type is // Only inline impl if the implementing type is
// reachable in rustdoc generated documentation // reachable in rustdoc generated documentation
if !did.is_local() { if !did.is_local() {
if let Some(did) = for_.def_id() { if let Some(did) = for_.def_id(&cx.cache) {
if !cx.cache.access_levels.is_public(did) { if !cx.cache.access_levels.is_public(did) {
return; return;
} }
@@ -464,7 +462,7 @@ crate fn build_impl(
} }
while let Some(ty) = stack.pop() { while let Some(ty) = stack.pop() {
if let Some(did) = ty.def_id() { if let Some(did) = ty.def_id(&cx.cache) {
if tcx.get_attrs(did).lists(sym::doc).has_word(sym::hidden) { if tcx.get_attrs(did).lists(sym::doc).has_word(sym::hidden) {
return; return;
} }
@@ -481,7 +479,11 @@ crate fn build_impl(
let (merged_attrs, cfg) = merge_attrs(cx, parent_module.into(), load_attrs(cx, did), attrs); let (merged_attrs, cfg) = merge_attrs(cx, parent_module.into(), load_attrs(cx, did), attrs);
trace!("merged_attrs={:?}", merged_attrs); trace!("merged_attrs={:?}", merged_attrs);
trace!("build_impl: impl {:?} for {:?}", trait_.as_ref().map(|t| t.def_id()), for_.def_id()); trace!(
"build_impl: impl {:?} for {:?}",
trait_.as_ref().map(|t| t.def_id()),
for_.def_id(&cx.cache)
);
ret.push(clean::Item::from_def_id_and_attrs_and_parts( ret.push(clean::Item::from_def_id_and_attrs_and_parts(
did, did,
None, None,

View File

@@ -383,7 +383,7 @@ impl<'tcx> Clean<Type> for ty::ProjectionTy<'tcx> {
let self_type = self.self_ty().clean(cx); let self_type = self.self_ty().clean(cx);
Type::QPath { Type::QPath {
name: cx.tcx.associated_item(self.item_def_id).ident.name, name: cx.tcx.associated_item(self.item_def_id).ident.name,
self_def_id: self_type.def_id(), self_def_id: self_type.def_id(&cx.cache),
self_type: box self_type, self_type: box self_type,
trait_, trait_,
} }
@@ -1883,7 +1883,7 @@ fn clean_impl(impl_: &hir::Impl<'_>, hir_id: hir::HirId, cx: &mut DocContext<'_>
} }
let for_ = impl_.self_ty.clean(cx); let for_ = impl_.self_ty.clean(cx);
let type_alias = for_.def_id().and_then(|did| match tcx.def_kind(did) { let type_alias = for_.def_id(&cx.cache).and_then(|did| match tcx.def_kind(did) {
DefKind::TyAlias => Some(tcx.type_of(did).clean(cx)), DefKind::TyAlias => Some(tcx.type_of(did).clean(cx)),
_ => None, _ => None,
}); });

View File

@@ -1370,17 +1370,10 @@ crate enum FnRetTy {
DefaultReturn, DefaultReturn,
} }
impl GetDefId for FnRetTy { impl FnRetTy {
fn def_id(&self) -> Option<DefId> { crate fn as_return(&self) -> Option<&Type> {
match *self { match self {
Return(ref ty) => ty.def_id(), Return(ret) => Some(ret),
DefaultReturn => None,
}
}
fn def_id_full(&self, cache: &Cache) -> Option<DefId> {
match *self {
Return(ref ty) => ty.def_id_full(cache),
DefaultReturn => None, DefaultReturn => None,
} }
} }
@@ -1458,34 +1451,6 @@ crate enum Type {
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Type, 72); rustc_data_structures::static_assert_size!(Type, 72);
crate trait GetDefId {
/// Use this method to get the [`DefId`] of a [`clean`] AST node.
/// This will return [`None`] when called on a primitive [`clean::Type`].
/// Use [`Self::def_id_full`] if you want to include primitives.
///
/// [`clean`]: crate::clean
/// [`clean::Type`]: crate::clean::Type
// FIXME: get rid of this function and always use `def_id_full`
fn def_id(&self) -> Option<DefId>;
/// Use this method to get the [DefId] of a [clean] AST node, including [PrimitiveType]s.
///
/// See [`Self::def_id`] for more.
///
/// [clean]: crate::clean
fn def_id_full(&self, cache: &Cache) -> Option<DefId>;
}
impl<T: GetDefId> GetDefId for Option<T> {
fn def_id(&self) -> Option<DefId> {
self.as_ref().and_then(|d| d.def_id())
}
fn def_id_full(&self, cache: &Cache) -> Option<DefId> {
self.as_ref().and_then(|d| d.def_id_full(cache))
}
}
impl Type { impl Type {
crate fn primitive_type(&self) -> Option<PrimitiveType> { crate fn primitive_type(&self) -> Option<PrimitiveType> {
match *self { match *self {
@@ -1564,18 +1529,28 @@ impl Type {
QPath { ref self_type, .. } => return self_type.inner_def_id(cache), QPath { ref self_type, .. } => return self_type.inner_def_id(cache),
Generic(_) | Infer | ImplTrait(_) => return None, Generic(_) | Infer | ImplTrait(_) => return None,
}; };
cache.and_then(|c| Primitive(t).def_id_full(c)) cache.and_then(|c| Primitive(t).def_id(c))
}
}
impl GetDefId for Type {
fn def_id(&self) -> Option<DefId> {
self.inner_def_id(None)
} }
fn def_id_full(&self, cache: &Cache) -> Option<DefId> { /// Use this method to get the [DefId] of a [clean] AST node, including [PrimitiveType]s.
///
/// See [`Self::def_id_no_primitives`] for more.
///
/// [clean]: crate::clean
crate fn def_id(&self, cache: &Cache) -> Option<DefId> {
self.inner_def_id(Some(cache)) self.inner_def_id(Some(cache))
} }
/// Use this method to get the [`DefId`] of a [`clean`] AST node.
/// This will return [`None`] when called on a primitive [`clean::Type`].
/// Use [`Self::def_id`] if you want to include primitives.
///
/// [`clean`]: crate::clean
/// [`clean::Type`]: crate::clean::Type
// FIXME: get rid of this function and always use `def_id`
crate fn def_id_no_primitives(&self) -> Option<DefId> {
self.inner_def_id(None)
}
} }
/// A primitive (aka, builtin) type. /// A primitive (aka, builtin) type.
@@ -2092,16 +2067,6 @@ crate struct Typedef {
crate item_type: Option<Type>, crate item_type: Option<Type>,
} }
impl GetDefId for Typedef {
fn def_id(&self) -> Option<DefId> {
self.type_.def_id()
}
fn def_id_full(&self, cache: &Cache) -> Option<DefId> {
self.type_.def_id_full(cache)
}
}
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
crate struct OpaqueTy { crate struct OpaqueTy {
crate bounds: Vec<GenericBound>, crate bounds: Vec<GenericBound>,

View File

@@ -6,7 +6,7 @@ use rustc_middle::middle::privacy::AccessLevels;
use rustc_middle::ty::TyCtxt; use rustc_middle::ty::TyCtxt;
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use crate::clean::{self, GetDefId, ItemId, PrimitiveType}; use crate::clean::{self, ItemId, PrimitiveType};
use crate::config::RenderOptions; use crate::config::RenderOptions;
use crate::fold::DocFolder; use crate::fold::DocFolder;
use crate::formats::item_type::ItemType; use crate::formats::item_type::ItemType;
@@ -206,7 +206,9 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
|| i.trait_ || i.trait_
.as_ref() .as_ref()
.map_or(false, |t| self.cache.masked_crates.contains(&t.def_id().krate)) .map_or(false, |t| self.cache.masked_crates.contains(&t.def_id().krate))
|| i.for_.def_id().map_or(false, |d| self.cache.masked_crates.contains(&d.krate)) || i.for_
.def_id(self.cache)
.map_or(false, |d| self.cache.masked_crates.contains(&d.krate))
{ {
return None; return None;
} }
@@ -454,7 +456,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
if let Some(generics) = i.trait_.as_ref().and_then(|t| t.generics()) { if let Some(generics) = i.trait_.as_ref().and_then(|t| t.generics()) {
for bound in generics { for bound in generics {
if let Some(did) = bound.def_id() { if let Some(did) = bound.def_id(self.cache) {
dids.insert(did); dids.insert(did);
} }
} }

View File

@@ -7,9 +7,7 @@ use rustc_span::symbol::Symbol;
use serde::ser::{Serialize, SerializeStruct, Serializer}; use serde::ser::{Serialize, SerializeStruct, Serializer};
use crate::clean; use crate::clean;
use crate::clean::types::{ use crate::clean::types::{FnDecl, FnRetTy, GenericBound, Generics, Type, WherePredicate};
FnDecl, FnRetTy, GenericBound, Generics, GetDefId, Type, WherePredicate,
};
use crate::formats::cache::Cache; use crate::formats::cache::Cache;
use crate::formats::item_type::ItemType; use crate::formats::item_type::ItemType;
use crate::html::markdown::short_markdown_summary; use crate::html::markdown::short_markdown_summary;
@@ -278,7 +276,7 @@ crate fn get_real_types<'tcx>(
res: &mut FxHashSet<(Type, ItemType)>, res: &mut FxHashSet<(Type, ItemType)>,
) -> usize { ) -> usize {
fn insert(res: &mut FxHashSet<(Type, ItemType)>, tcx: TyCtxt<'_>, ty: Type) -> usize { fn insert(res: &mut FxHashSet<(Type, ItemType)>, tcx: TyCtxt<'_>, ty: Type) -> usize {
if let Some(kind) = ty.def_id().map(|did| tcx.def_kind(did).into()) { if let Some(kind) = ty.def_id_no_primitives().map(|did| tcx.def_kind(did).into()) {
res.insert((ty, kind)); res.insert((ty, kind));
1 1
} else if ty.is_primitive() { } else if ty.is_primitive() {
@@ -298,7 +296,9 @@ crate fn get_real_types<'tcx>(
if let Type::Generic(arg_s) = *arg { if let Type::Generic(arg_s) = *arg {
if let Some(where_pred) = generics.where_predicates.iter().find(|g| match g { if let Some(where_pred) = generics.where_predicates.iter().find(|g| match g {
WherePredicate::BoundPredicate { ty, .. } => ty.def_id() == arg.def_id(), WherePredicate::BoundPredicate { ty, .. } => {
ty.def_id_no_primitives() == arg.def_id_no_primitives()
}
_ => false, _ => false,
}) { }) {
let bounds = where_pred.get_bounds().unwrap_or_else(|| &[]); let bounds = where_pred.get_bounds().unwrap_or_else(|| &[]);
@@ -365,7 +365,8 @@ crate fn get_all_types<'tcx>(
if !args.is_empty() { if !args.is_empty() {
all_types.extend(args); all_types.extend(args);
} else { } else {
if let Some(kind) = arg.type_.def_id().map(|did| tcx.def_kind(did).into()) { if let Some(kind) = arg.type_.def_id_no_primitives().map(|did| tcx.def_kind(did).into())
{
all_types.insert((arg.type_.clone(), kind)); all_types.insert((arg.type_.clone(), kind));
} }
} }
@@ -376,7 +377,9 @@ crate fn get_all_types<'tcx>(
let mut ret = FxHashSet::default(); let mut ret = FxHashSet::default();
get_real_types(generics, return_type, tcx, 0, &mut ret); get_real_types(generics, return_type, tcx, 0, &mut ret);
if ret.is_empty() { if ret.is_empty() {
if let Some(kind) = return_type.def_id().map(|did| tcx.def_kind(did).into()) { if let Some(kind) =
return_type.def_id_no_primitives().map(|did| tcx.def_kind(did).into())
{
ret.insert((return_type.clone(), kind)); ret.insert((return_type.clone(), kind));
} }
} }

View File

@@ -62,7 +62,7 @@ use rustc_span::{
use serde::ser::SerializeSeq; use serde::ser::SerializeSeq;
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use crate::clean::{self, GetDefId, ItemId, RenderedLink, SelfTy}; use crate::clean::{self, ItemId, RenderedLink, SelfTy};
use crate::docfs::PathError; use crate::docfs::PathError;
use crate::error::Error; use crate::error::Error;
use crate::formats::cache::Cache; use crate::formats::cache::Cache;
@@ -1184,8 +1184,8 @@ fn render_deref_methods(
debug!("Render deref methods for {:#?}, target {:#?}", impl_.inner_impl().for_, target); debug!("Render deref methods for {:#?}, target {:#?}", impl_.inner_impl().for_, target);
let what = let what =
AssocItemRender::DerefFor { trait_: deref_type, type_: real_target, deref_mut_: deref_mut }; AssocItemRender::DerefFor { trait_: deref_type, type_: real_target, deref_mut_: deref_mut };
if let Some(did) = target.def_id_full(cache) { if let Some(did) = target.def_id(cache) {
if let Some(type_did) = impl_.inner_impl().for_.def_id_full(cache) { if let Some(type_did) = impl_.inner_impl().for_.def_id(cache) {
// `impl Deref<Target = S> for S` // `impl Deref<Target = S> for S`
if did == type_did { if did == type_did {
// Avoid infinite cycles // Avoid infinite cycles
@@ -1231,7 +1231,7 @@ fn should_render_item(item: &clean::Item, deref_mut_: bool, tcx: TyCtxt<'_>) ->
fn notable_traits_decl(decl: &clean::FnDecl, cx: &Context<'_>) -> String { fn notable_traits_decl(decl: &clean::FnDecl, cx: &Context<'_>) -> String {
let mut out = Buffer::html(); let mut out = Buffer::html();
if let Some(did) = decl.output.def_id_full(cx.cache()) { if let Some(did) = decl.output.as_return().and_then(|t| t.def_id(cx.cache())) {
if let Some(impls) = cx.cache().impls.get(&did) { if let Some(impls) = cx.cache().impls.get(&did) {
for i in impls { for i in impls {
let impl_ = i.inner_impl(); let impl_ = i.inner_impl();
@@ -2074,8 +2074,8 @@ fn sidebar_deref_methods(cx: &Context<'_>, out: &mut Buffer, impl_: &Impl, v: &[
}) })
{ {
debug!("found target, real_target: {:?} {:?}", target, real_target); debug!("found target, real_target: {:?} {:?}", target, real_target);
if let Some(did) = target.def_id_full(c) { if let Some(did) = target.def_id(c) {
if let Some(type_did) = impl_.inner_impl().for_.def_id_full(c) { if let Some(type_did) = impl_.inner_impl().for_.def_id(c) {
// `impl Deref<Target = S> for S` // `impl Deref<Target = S> for S`
if did == type_did { if did == type_did {
// Avoid infinite cycles // Avoid infinite cycles
@@ -2085,7 +2085,7 @@ fn sidebar_deref_methods(cx: &Context<'_>, out: &mut Buffer, impl_: &Impl, v: &[
} }
let deref_mut = v.iter().any(|i| i.trait_did() == cx.tcx().lang_items().deref_mut_trait()); let deref_mut = v.iter().any(|i| i.trait_did() == cx.tcx().lang_items().deref_mut_trait());
let inner_impl = target let inner_impl = target
.def_id_full(c) .def_id(c)
.or_else(|| { .or_else(|| {
target.primitive_type().and_then(|prim| c.primitive_locations.get(&prim).cloned()) target.primitive_type().and_then(|prim| c.primitive_locations.get(&prim).cloned())
}) })
@@ -2246,10 +2246,7 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean
let mut res = implementors let mut res = implementors
.iter() .iter()
.filter(|i| { .filter(|i| {
i.inner_impl() i.inner_impl().for_.def_id(cache).map_or(false, |d| !cache.paths.contains_key(&d))
.for_
.def_id_full(cache)
.map_or(false, |d| !cache.paths.contains_key(&d))
}) })
.filter_map(|i| extract_for_impl_name(&i.impl_item, cx)) .filter_map(|i| extract_for_impl_name(&i.impl_item, cx))
.collect::<Vec<_>>(); .collect::<Vec<_>>();

View File

@@ -21,7 +21,7 @@ use super::{
render_impl, render_stability_since_raw, write_srclink, AssocItemLink, Context, render_impl, render_stability_since_raw, write_srclink, AssocItemLink, Context,
ImplRenderingParameters, ImplRenderingParameters,
}; };
use crate::clean::{self, GetDefId}; use crate::clean;
use crate::formats::item_type::ItemType; use crate::formats::item_type::ItemType;
use crate::formats::{AssocItemRender, Impl, RenderMode}; use crate::formats::{AssocItemRender, Impl, RenderMode};
use crate::html::escape::Escape; use crate::html::escape::Escape;
@@ -742,7 +742,7 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
} }
let (local, foreign) = implementors.iter().partition::<Vec<_>, _>(|i| { let (local, foreign) = implementors.iter().partition::<Vec<_>, _>(|i| {
i.inner_impl().for_.def_id_full(cache).map_or(true, |d| cache.paths.contains_key(&d)) i.inner_impl().for_.def_id(cache).map_or(true, |d| cache.paths.contains_key(&d))
}); });
let (mut synthetic, mut concrete): (Vec<&&Impl>, Vec<&&Impl>) = let (mut synthetic, mut concrete): (Vec<&&Impl>, Vec<&&Impl>) =

View File

@@ -70,7 +70,7 @@ crate fn collect_trait_impls(krate: Crate, cx: &mut DocContext<'_>) -> Crate {
if let Some(prim) = target.primitive_type() { if let Some(prim) = target.primitive_type() {
cleaner.prims.insert(prim); cleaner.prims.insert(prim);
} else if let Some(did) = target.def_id() { } else if let Some(did) = target.def_id(&cx.cache) {
cleaner.items.insert(did.into()); cleaner.items.insert(did.into());
} }
} }
@@ -187,7 +187,7 @@ impl BadImplStripper {
true true
} else if let Some(prim) = ty.primitive_type() { } else if let Some(prim) = ty.primitive_type() {
self.prims.contains(&prim) self.prims.contains(&prim)
} else if let Some(did) = ty.def_id() { } else if let Some(did) = ty.def_id_no_primitives() {
self.keep_impl_with_def_id(did.into()) self.keep_impl_with_def_id(did.into())
} else { } else {
false false

View File

@@ -2,7 +2,7 @@ use rustc_hir::def_id::DefId;
use rustc_middle::middle::privacy::AccessLevels; use rustc_middle::middle::privacy::AccessLevels;
use std::mem; use std::mem;
use crate::clean::{self, GetDefId, Item, ItemIdSet}; use crate::clean::{self, Item, ItemIdSet};
use crate::fold::{strip_item, DocFolder}; use crate::fold::{strip_item, DocFolder};
crate struct Stripper<'a> { crate struct Stripper<'a> {
@@ -127,7 +127,7 @@ impl<'a> DocFolder for ImplStripper<'a> {
if imp.trait_.is_none() && imp.items.is_empty() { if imp.trait_.is_none() && imp.items.is_empty() {
return None; return None;
} }
if let Some(did) = imp.for_.def_id() { if let Some(did) = imp.for_.def_id_no_primitives() {
if did.is_local() && !imp.for_.is_assoc_ty() && !self.retained.contains(&did.into()) if did.is_local() && !imp.for_.is_assoc_ty() && !self.retained.contains(&did.into())
{ {
debug!("ImplStripper: impl item for stripped type; removing"); debug!("ImplStripper: impl item for stripped type; removing");
@@ -142,7 +142,7 @@ impl<'a> DocFolder for ImplStripper<'a> {
} }
if let Some(generics) = imp.trait_.as_ref().and_then(|t| t.generics()) { if let Some(generics) = imp.trait_.as_ref().and_then(|t| t.generics()) {
for typaram in generics { for typaram in generics {
if let Some(did) = typaram.def_id() { if let Some(did) = typaram.def_id_no_primitives() {
if did.is_local() && !self.retained.contains(&did.into()) { if did.is_local() && !self.retained.contains(&did.into()) {
debug!( debug!(
"ImplStripper: stripped item in trait's generics; removing impl" "ImplStripper: stripped item in trait's generics; removing impl"

View File

@@ -85,6 +85,8 @@ const INTRA_DOC_LINK_EXCEPTIONS: &[(&str, &[&str])] = &[
("core/slice/trait.SliceIndex.html", &["begin</code>, <code>end"]), ("core/slice/trait.SliceIndex.html", &["begin</code>, <code>end"]),
("alloc/slice/trait.SliceIndex.html", &["begin</code>, <code>end"]), ("alloc/slice/trait.SliceIndex.html", &["begin</code>, <code>end"]),
("std/slice/trait.SliceIndex.html", &["begin</code>, <code>end"]), ("std/slice/trait.SliceIndex.html", &["begin</code>, <code>end"]),
("core/primitive.str.html", &["begin</code>, <code>end"]),
("std/primitive.str.html", &["begin</code>, <code>end"]),
]; ];