Skip to content

Commit

Permalink
Fixed item links
Browse files Browse the repository at this point in the history
  • Loading branch information
FractalFir committed Jan 26, 2024
1 parent 1a376cc commit b61c1d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions compiler/rustc_middle/src/ty/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl<'tcx> Instance<'tcx> {
tcx.resolve_instance(tcx.erase_regions(param_env.and((def_id, args))))
}

/// Behaves exactly like [`resolve`], but panics on error.
/// Behaves exactly like [`Self::resolve`], but panics on error.
pub fn expect_resolve(
tcx: TyCtxt<'tcx>,
param_env: ty::ParamEnv<'tcx>,
Expand Down Expand Up @@ -543,7 +543,7 @@ impl<'tcx> Instance<'tcx> {
}
}

/// Returns an instance representing the function [`drop_in_place`] with its generic argument set to `ty`.
/// Returns an instance representing the function [`core::ptr::drop_in_place`] with its generic argument set to `ty`.
pub fn resolve_drop_in_place(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> ty::Instance<'tcx> {
let def_id = tcx.require_lang_item(LangItem::DropInPlace, None);
let args = tcx.mk_args(&[ty.into()]);
Expand Down Expand Up @@ -642,7 +642,7 @@ impl<'tcx> Instance<'tcx> {
/// Instantiates a generic value `v`(like `Vec<T>`), substituting its generic arguments and turning it into a concrete one(like `i32`, or `Vec<f32>`).
/// If a value is not generic, this will do nothing.
/// This function does not erase lifetimes, so a value like `&'a i32` will remain unchanged.
/// For monomorphizing generics while also erasing lifetimes, try using [`instantiate_mir_and_normalize_erasing_regions`].
/// For monomorphizing generics while also erasing lifetimes, try using [`Self::instantiate_mir_and_normalize_erasing_regions`].
pub fn instantiate_mir<T>(&self, tcx: TyCtxt<'tcx>, v: EarlyBinder<&T>) -> T
where
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
Expand All @@ -658,8 +658,8 @@ impl<'tcx> Instance<'tcx> {
/// Instantiates a generic value `v`(like `Vec<T>`), substituting its generic arguments and turning it into a concrete one(like `i32`, or `Vec<f32>`).
/// This function erases lifetimes, so a value like `&'a i32` will become `&ReErased i32`.
/// If a value is not generic and has no lifetime info, this will do nothing.
/// For monomorphizing generics while preserving lifetimes, use [`instantiate_mir`].
/// This function will panic if normalization fails. If you want to handle normalization errors, use [`try_instantiate_mir_and_normalize_erasing_regions`]
/// For monomorphizing generics while preserving lifetimes, use [`Self::instantiate_mir`].
/// This function will panic if normalization fails. If you want to handle normalization errors, use [`Self::try_instantiate_mir_and_normalize_erasing_regions`]
#[inline(always)]
pub fn instantiate_mir_and_normalize_erasing_regions<T>(
&self,
Expand All @@ -677,7 +677,7 @@ impl<'tcx> Instance<'tcx> {
}
}

/// A version of [`instantiate_mir_and_normalize_erasing_regions`] which will returns a [`NormalizationError`] on normalization failure instead of panicking.
/// A version of [`Self::instantiate_mir_and_normalize_erasing_regions`] which will returns a [`NormalizationError`] on normalization failure instead of panicking.
#[inline(always)]
pub fn try_instantiate_mir_and_normalize_erasing_regions<T>(
&self,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,7 @@ impl<'tcx> Ty<'tcx> {
self.is_ref() || self.is_unsafe_ptr() || self.is_fn_ptr()
}

/// Checks if this type is an [`alloc::boxed::Box`].
/// Checks if this type is an [`Box`].
#[inline]
pub fn is_box(self) -> bool {
match self.kind() {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/abi/call/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ impl RiscvInterruptKind {
/// should be passed in order to respect the native ABI.
///
/// Signature contained within this function does not have to match the one present in MIR.
/// Certain attributtes, like `#[track_caller]` can introduce addtional arguments, which are present in [`FnAbi`], but not in [`rustc_middle::ty::FnSig`].
/// Certain attributtes, like `#[track_caller]` can introduce addtional arguments, which are present in [`FnAbi`], but not in[`rustc_middle::ty::FnSig`.
/// This difference is not relevant in most cases, but should still be kept in mind.
///
/// I will do my best to describe this structure, but these
Expand Down

0 comments on commit b61c1d6

Please sign in to comment.