Skip to content

Commit eaa6273

Browse files
committed
Auto merge of #731 - JakobDegen:fix_docs, r=nikomatsakis
Fix broken markdown and intr-doc links in documentation Was reading documentation and stumbled across some broken markdown. There are still lots of other broken intra-doc links in the repo, but this covers at least some of them and the more critical issues in `wf.rs`.
2 parents 0dc1687 + 4b64a07 commit eaa6273

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

chalk-ir/src/interner.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
6363
/// `Ty<Self>`, which wraps this type.
6464
///
6565
/// An `InternedType` must be something that can be created from a
66-
/// `TyKind` (by the [`intern_ty`] method) and then later
67-
/// converted back (by the [`ty_data`] method). The interned form
66+
/// `TyKind` (by the [`intern_ty`][Self::intern_ty] method) and then later
67+
/// converted back (by the [`ty_data`][Self::ty_data] method). The interned form
6868
/// must also introduce indirection, either via a `Box`, `&`, or
6969
/// other pointer type.
7070
type InternedType: Debug + Clone + Eq + Hash;
@@ -74,17 +74,17 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
7474
/// `Lifetime<Self>`, which wraps this type.
7575
///
7676
/// An `InternedLifetime` must be something that can be created
77-
/// from a `LifetimeData` (by the [`intern_lifetime`] method) and
78-
/// then later converted back (by the [`lifetime_data`] method).
77+
/// from a `LifetimeData` (by the [`intern_lifetime`][Self::intern_lifetime] method) and
78+
/// then later converted back (by the [`lifetime_data`][Self::lifetime_data] method).
7979
type InternedLifetime: Debug + Clone + Eq + Hash;
8080

8181
/// "Interned" representation of const expressions. In normal user code,
8282
/// `Self::InternedConst` is not referenced. Instead, we refer to
8383
/// `Const<Self>`, which wraps this type.
8484
///
8585
/// An `InternedConst` must be something that can be created
86-
/// from a `ConstData` (by the [`intern_const`] method) and
87-
/// then later converted back (by the [`const_data`] method).
86+
/// from a `ConstData` (by the [`intern_const`][Self::intern_const] method) and
87+
/// then later converted back (by the [`const_data`][Self::const_data] method).
8888
type InternedConst: Debug + Clone + Eq + Hash;
8989

9090
/// "Interned" representation of an evaluated const value.

chalk-ir/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ pub enum Mutability {
302302
/// `forall<T> { Goal(T) }` (syntactical representation)
303303
/// `forall { Goal(?0) }` (used a DeBruijn index)
304304
/// `Goal(!U1)` (the quantifier was moved to the environment and replaced with a universe index)
305-
/// See https://rustc-dev-guide.rust-lang.org/borrow_check/region_inference.html#placeholders-and-universes for more.
305+
/// See <https://rustc-dev-guide.rust-lang.org/borrow_check/region_inference.html#placeholders-and-universes> for more.
306306
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
307307
pub struct UniverseIndex {
308308
/// The counter for the universe index, starts with 0.
@@ -2114,7 +2114,7 @@ impl<T: HasInterner> Binders<T> {
21142114
}
21152115

21162116
/// Skips the binder and returns the "bound" value as well as the skipped free variables. This
2117-
/// is just as risky as [`skip_binders`].
2117+
/// is just as risky as [`skip_binders`][Self::skip_binders].
21182118
pub fn into_value_and_skipped_binders(self) -> (T, VariableKinds<T::Interner>) {
21192119
(self.value, self.binders)
21202120
}

chalk-solve/src/display/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ macro_rules! write_joined_non_empty_list {
2424
}};
2525
}
2626

27-
/// Processes a name given by an [`Interner`][chalk_ir::Interner] debug
27+
/// Processes a name given by an [`Interner`][chalk_ir::interner::Interner] debug
2828
/// method into something usable by the `display` module.
2929
///
3030
/// This is specifically useful when implementing

chalk-solve/src/infer/invert.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ impl<I: Interner> InferenceTable<I> {
1818
/// yet been assigned a value, then this function will return
1919
/// `None`, indicating that we cannot prove negation for this goal
2020
/// yet. This follows the approach in Clark's original
21-
/// negation-as-failure paper [1], where negative goals are only
21+
/// [negation-as-failure paper][1], where negative goals are only
2222
/// permitted if they contain no free (existential) variables.
2323
///
24-
/// [1] https://www.doc.ic.ac.uk/~klc/NegAsFailure.pdf
24+
/// [1]: https://www.doc.ic.ac.uk/~klc/NegAsFailure.pdf
2525
///
2626
/// Restricting free existential variables is done because the
2727
/// semantics of such queries is not what you expect: it basically

chalk-solve/src/wf.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -893,16 +893,16 @@ impl WfWellKnownConstraints {
893893

894894
/// Verify constraints a CoerceUnsized impl.
895895
/// Rules for CoerceUnsized impl to be considered well-formed:
896-
/// a) pointer conversions: &[mut] T -> &[mut] U, &[mut] T -> *[mut] U,
897-
/// *[mut] T -> *[mut] U are considered valid if
898-
/// 1) T: Unsize<U>
896+
/// 1) pointer conversions: `&[mut] T -> &[mut] U`, `&[mut] T -> *[mut] U`,
897+
/// `*[mut] T -> *[mut] U` are considered valid if
898+
/// 1) `T: Unsize<U>`
899899
/// 2) mutability is respected, i.e. immutable -> immutable, mutable -> immutable,
900900
/// mutable -> mutable conversions are allowed, immutable -> mutable is not.
901-
/// b) struct conversions of structures with the same definition, `S<P0...Pn>` -> `S<Q0...Qn>`.
901+
/// 2) struct conversions of structures with the same definition, `S<P0...Pn>` -> `S<Q0...Qn>`.
902902
/// To check if this impl is legal, we would walk down the fields of `S`
903903
/// and consider their types with both substitutes. We are looking to find
904-
/// exactly one (non-phantom) field that has changed its type (from T to U), and
905-
/// expect T to be unsizeable to U, i.e. T: CoerceUnsized<U>.
904+
/// exactly one (non-phantom) field that has changed its type (from `T` to `U`), and
905+
/// expect `T` to be unsizeable to `U`, i.e. `T: CoerceUnsized<U>`.
906906
///
907907
/// As an example, consider a struct
908908
/// ```rust

0 commit comments

Comments
 (0)