未验证 提交 b25261f4 编写于 作者: D Dylan DPC 提交者: GitHub

Rollup merge of #76714 - camelid:patch-3, r=jonas-schievink

Small docs improvements

@rustbot modify labels: T-doc T-compiler
......@@ -2285,8 +2285,8 @@ fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
/// Constants
///
/// Two constants are equal if they are the same constant. Note that
/// this does not necessarily mean that they are "==" in Rust -- in
/// particular one must be wary of `NaN`!
/// this does not necessarily mean that they are `==` in Rust -- in
/// particular, one must be wary of `NaN`!
#[derive(Clone, Copy, PartialEq, TyEncodable, TyDecodable, HashStable)]
pub struct Constant<'tcx> {
......
......@@ -66,8 +66,8 @@
use std::ops::{Bound, Deref};
use std::sync::Arc;
/// A type that is not publicly constructable. This prevents people from making `TyKind::Error`
/// except through `tcx.err*()`, which are in this module.
/// A type that is not publicly constructable. This prevents people from making [`TyKind::Error`]s
/// except through the error-reporting functions on a [`tcx`][TyCtxt].
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)]
#[derive(TyEncodable, TyDecodable, HashStable)]
pub struct DelaySpanBugEmitted(());
......
......@@ -1233,13 +1233,13 @@ pub fn to_const(self, tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> &'tcx ty::Const<'tcx>
/// particular, imagine a type like this:
///
/// for<'a> fn(for<'b> fn(&'b isize, &'a isize), &'a char)
/// ^ ^ | | |
/// | | | | |
/// | +------------+ 0 | |
/// | | |
/// +--------------------------------+ 1 |
/// | |
/// +------------------------------------------+ 0
/// ^ ^ | | |
/// | | | | |
/// | +------------+ 0 | |
/// | | |
/// +----------------------------------+ 1 |
/// | |
/// +----------------------------------------------+ 0
///
/// In this type, there are two binders (the outer fn and the inner
/// fn). We need to be able to determine, for any given region, which
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册