diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 6020f7ce7f5..c98a2d12485 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -327,7 +327,7 @@ impl Option { /// Instead, prefer to use pattern matching and handle the `None` /// case explicitly. /// - /// # Examle + /// # Example /// /// ``` /// let x = Some("air"); diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 31b242da27b..514035f04e0 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -253,7 +253,7 @@ pub struct Substructure<'a> { pub type_ident: Ident, /// ident of the method pub method_ident: Ident, - /// dereferenced access to any Self or Ptr(Self, _) arguments + /// dereferenced access to any `Self` or `Ptr(Self, _)` arguments pub self_args: &'a [P], /// verbatim access to any other arguments pub nonself_args: &'a [P], @@ -270,7 +270,7 @@ pub struct FieldInfo { /// (specifically, a reference to it). pub self_: P, /// The expressions corresponding to references to this field in - /// the other Self arguments. + /// the other `Self` arguments. pub other: Vec>, } @@ -291,17 +291,17 @@ pub enum SubstructureFields<'a> { /// variant. EnumMatching(uint, &'a ast::Variant, Vec), - /// non-matching variants of the enum, but with all state hidden from - /// the consequent code. The first component holds Idents for all of - /// the Self arguments; the second component is a slice of all of the + /// Non-matching variants of the enum, but with all state hidden from + /// the consequent code. The first component holds `Ident`s for all of + /// the `Self` arguments; the second component is a slice of all of the /// variants for the enum itself, and the third component is a list of - /// Idents bound to the variant index values for each of the actual - /// input Self arguments. + /// `Ident`s bound to the variant index values for each of the actual + /// input `Self` arguments. EnumNonMatchingCollapsed(Vec, &'a [P], &'a [Ident]), - /// A static method where Self is a struct. + /// A static method where `Self` is a struct. StaticStruct(&'a ast::StructDef, StaticFields), - /// A static method where Self is an enum. + /// A static method where `Self` is an enum. StaticEnum(&'a ast::EnumDef, Vec<(Ident, Span, StaticFields)>), } @@ -313,10 +313,10 @@ pub type CombineSubstructureFunc<'a> = |&mut ExtCtxt, Span, &Substructure|: 'a -> P; /// Deal with non-matching enum variants. The tuple is a list of -/// identifiers (one for each Self argument, which could be any of the +/// identifiers (one for each `Self` argument, which could be any of the /// variants since they have been collapsed together) and the identifiers -/// holding the variant index value for each of the Self arguments. The -/// last argument is all the non-Self args of the method being derived. +/// holding the variant index value for each of the `Self` arguments. The +/// last argument is all the non-`Self` args of the method being derived. pub type EnumNonMatchCollapsedFunc<'a> = |&mut ExtCtxt, Span, @@ -370,7 +370,7 @@ impl<'a> TraitDef<'a> { /// 'z, A, ..., Z>`, creates an impl like: /// /// ```ignore - /// impl<'a, ..., 'z, A:Tr B1 B2, ..., Z: Tr B1 B2> Tr for T { ... } + /// impl<'a, ..., 'z, A:Tr B1 B2, ..., Z: Tr B1 B2> Tr for T { ... } /// ``` /// /// where B1, B2, ... are the bounds given by `bounds_paths`.'