From 7e9d73cf2d9ddd6346fb5da26d32f2faa28f7eaa Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sun, 1 Nov 2015 16:32:51 +0530 Subject: [PATCH 1/2] Fix PatEnum docs --- src/librustc_front/hir.rs | 2 +- src/libsyntax/ast.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_front/hir.rs b/src/librustc_front/hir.rs index 079bf677c8e..776faef5317 100644 --- a/src/librustc_front/hir.rs +++ b/src/librustc_front/hir.rs @@ -417,7 +417,7 @@ pub enum Pat_ { /// set (of "PatIdents that refer to nullary enums") PatIdent(BindingMode, Spanned, Option>), - /// "None" means a * pattern where we don't bind the fields to names. + /// "None" means a `Variant(..)` pattern where we don't bind the fields to names. PatEnum(Path, Option>>), /// An associated const named using the qualified path `::CONST` or diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 7b3c33d53a3..989be60a103 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -593,7 +593,7 @@ pub enum Pat_ { /// set (of "PatIdents that refer to nullary enums") PatIdent(BindingMode, SpannedIdent, Option>), - /// "None" means a * pattern where we don't bind the fields to names. + /// "None" means a `Variant(..)` pattern where we don't bind the fields to names. PatEnum(Path, Option>>), /// An associated const named using the qualified path `::CONST` or From 8bb72cfe007589635cb867e12449a49f12d91044 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sun, 1 Nov 2015 16:37:12 +0530 Subject: [PATCH 2/2] Add code formatting on PatVec docs --- src/librustc_front/hir.rs | 4 ++-- src/libsyntax/ast.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_front/hir.rs b/src/librustc_front/hir.rs index 776faef5317..88973467712 100644 --- a/src/librustc_front/hir.rs +++ b/src/librustc_front/hir.rs @@ -439,8 +439,8 @@ pub enum Pat_ { PatLit(P), /// A range pattern, e.g. `1...2` PatRange(P, P), - /// [a, b, ..i, y, z] is represented as: - /// PatVec(box [a, b], Some(i), box [y, z]) + /// `[a, b, ..i, y, z]` is represented as: + /// `PatVec(box [a, b], Some(i), box [y, z])` PatVec(Vec>, Option>, Vec>), } diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 989be60a103..6c6d1544998 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -615,8 +615,8 @@ pub enum Pat_ { PatLit(P), /// A range pattern, e.g. `1...2` PatRange(P, P), - /// [a, b, ..i, y, z] is represented as: - /// PatVec(box [a, b], Some(i), box [y, z]) + /// `[a, b, ..i, y, z]` is represented as: + /// `PatVec(box [a, b], Some(i), box [y, z])` PatVec(Vec>, Option>, Vec>), /// A macro pattern; pre-expansion PatMac(Mac),