Skip to content

Commit 92ce795

Browse files
normalise language, break lines, wrap Rust paths in backticks
1 parent 158d66c commit 92ce795

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/rustdoc-json-types/lib.rs

+12-8
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ pub struct Constant {
242242
pub is_literal: bool,
243243
}
244244

245-
/// Describes a constraint applied to an associated type/constant, e.g.
245+
/// Describes a bound applied to an associated type/constant.
246+
///
247+
/// Example:
246248
/// ```text
247249
/// IntoIterator<Item = u32, IntoIter: Clone>
248250
/// ^^^^^^^^^^ ^^^^^^^^^^^^^^^
@@ -253,7 +255,7 @@ pub struct TypeBinding {
253255
pub name: String,
254256
/// Arguments provided to the associated type/constant.
255257
pub args: GenericArgs,
256-
/// The constraint applied to the associated type/constant.
258+
/// The kind of bound applied to the associated type/constant.
257259
pub binding: TypeBindingKind,
258260
}
259261

@@ -278,8 +280,8 @@ pub enum TypeBindingKind {
278280

279281
/// An opaque identifier for an item.
280282
///
281-
/// It can be used to lookup in [Crate::index] or [Crate::paths] to resolve it
282-
/// to an [Item].
283+
/// It can be used to lookup in [`Crate::index`] or [`Crate::paths`] to resolve it
284+
/// to an [`Item`].
283285
///
284286
/// Id's are only valid within a single JSON blob. They cannot be used to
285287
/// resolve references between the JSON output's for different crates.
@@ -292,6 +294,8 @@ pub enum TypeBindingKind {
292294
pub struct Id(pub String);
293295

294296
/// The fundamental kind of an item. Unlike [`ItemEnum`], this does not carry any aditional info.
297+
///
298+
/// See [`ItemSummary`].
295299
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
296300
#[serde(rename_all = "snake_case")]
297301
pub enum ItemKind {
@@ -352,6 +356,7 @@ pub enum ItemKind {
352356
}
353357

354358
/// Specific fields of an item.
359+
///
355360
/// See [`Item`].
356361
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
357362
#[serde(rename_all = "snake_case")]
@@ -626,7 +631,7 @@ pub struct Header {
626631
/// Is this function async?
627632
#[serde(rename = "async")]
628633
pub async_: bool,
629-
/// The calling convention used by the function.
634+
/// The ABI used by the function.
630635
pub abi: Abi,
631636
}
632637

@@ -820,7 +825,7 @@ pub enum WherePredicate {
820825
},
821826
}
822827

823-
/// Either a trait bound or a lifetime constraint.
828+
/// Either a trait bound or a lifetime bound.
824829
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
825830
#[serde(rename_all = "snake_case")]
826831
pub enum GenericBound {
@@ -1012,8 +1017,7 @@ pub struct FunctionPointer {
10121017
/// // ^^^^^^^
10131018
/// ```
10141019
pub generic_params: Vec<GenericParamDef>,
1015-
/// The core properties of the function, such as its calling convention, whether it is unsafe,
1016-
/// etc.
1020+
/// The core properties of the function, such as the ABI it conforms to, whether it's unsafe, etc.
10171021
pub header: Header,
10181022
}
10191023

0 commit comments

Comments
 (0)