Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dfcdcca

Browse files
committedJul 20, 2024
normalise language, break lines, wrap Rust paths in backticks
1 parent c08d7ae commit dfcdcca

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed
 

‎src/rustdoc-json-types/lib.rs

Lines changed: 12 additions & 8 deletions
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 {
@@ -1014,8 +1019,7 @@ pub struct FunctionPointer {
10141019
/// // ^^^^^^^
10151020
/// ```
10161021
pub generic_params: Vec<GenericParamDef>,
1017-
/// The core properties of the function, such as its calling convention, whether it is unsafe,
1018-
/// etc.
1022+
/// The core properties of the function, such as the ABI it conforms to, whether it's unsafe, etc.
10191023
pub header: Header,
10201024
}
10211025

0 commit comments

Comments
 (0)
Please sign in to comment.