diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-10-10 12:49:31 -0700 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2020-10-10 12:49:31 -0700 |
| commit | e2424a2c1f4d5502b8900a1701c7a8a3a2a28bf9 (patch) | |
| tree | d431227a69a447cbc2e8bdb7a0fc172be698484b | |
| parent | 5883d3de9c5536a3bdd69959fbf6e74ebccda729 (diff) | |
| download | rust-e2424a2c1f4d5502b8900a1701c7a8a3a2a28bf9.tar.gz rust-e2424a2c1f4d5502b8900a1701c7a8a3a2a28bf9.zip | |
Fix query docs
They were not formatted correctly, so rustdoc was interpreting some parts as code. Also cleaned up some other query docs that weren't causing issues, but were formatted incorrectly.
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index fc4c343372a..1acb44f6d22 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -92,7 +92,7 @@ rustc_queries! { /// Computes the `DefId` of the corresponding const parameter in case the `key` is a /// const argument and returns `None` otherwise. /// - /// ```rust + /// ```ignore (incomplete) /// let a = foo::<7>(); /// // ^ Calling `opt_const_param_of` for this argument, /// @@ -162,10 +162,12 @@ rustc_queries! { /// Specifically this is the bounds written on the trait's type /// definition, or those after the `impl` keyword /// + /// ```ignore (incomplete) /// type X: Bound + 'lt - /// ^^^^^^^^^^^ + /// // ^^^^^^^^^^^ /// impl Debug + Display - /// ^^^^^^^^^^^^^^^ + /// // ^^^^^^^^^^^^^^^ + /// ``` /// /// `key` is the `DefId` of the associated type or opaque type. /// @@ -176,18 +178,22 @@ rustc_queries! { /// Elaborated version of the predicates from `explicit_item_bounds`. /// - /// Example for + /// For example: /// + /// ``` /// trait MyTrait { - /// type MyAType: Eq + ?Sized` + /// type MyAType: Eq + ?Sized; /// } + /// ``` /// /// `explicit_item_bounds` returns `[<Self as MyTrait>::MyAType: Eq]`, /// and `item_bounds` returns + /// ```text /// [ /// <Self as Trait>::MyAType: Eq, /// <Self as Trait>::MyAType: PartialEq<<Self as Trait>::MyAType> /// ] + /// ``` /// /// Bounds from the parent (e.g. with nested impl trait) are not included. query item_bounds(key: DefId) -> &'tcx ty::List<ty::Predicate<'tcx>> { |
