Skip to content

Commit

Permalink
Fix up variable names in exhaustive matching idiom comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 27, 2022
1 parent c1a63c4 commit d545093
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ ast_enum_of_structs! {
// this enum.
//
// match expr {
// Expr::Array(e) => {...}
// Expr::Assign(e) => {...}
// Expr::Array(expr) => {...}
// Expr::Assign(expr) => {...}
// ...
// Expr::Yield(e) => {...}
// Expr::Yield(expr) => {...}
//
// #[cfg(test)]
// Expr::__TestExhaustive(_) => unimplemented!(),
Expand Down
32 changes: 16 additions & 16 deletions src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ ast_enum_of_structs! {
// The following is the only supported idiom for exhaustive matching of
// this enum.
//
// match expr {
// Item::Const(e) => {...}
// Item::Enum(e) => {...}
// match item {
// Item::Const(item) => {...}
// Item::Enum(item) => {...}
// ...
// Item::Verbatim(e) => {...}
// Item::Verbatim(item) => {...}
//
// #[cfg(test)]
// Item::__TestExhaustive(_) => unimplemented!(),
Expand Down Expand Up @@ -583,11 +583,11 @@ ast_enum_of_structs! {
// The following is the only supported idiom for exhaustive matching of
// this enum.
//
// match expr {
// ForeignItem::Fn(e) => {...}
// ForeignItem::Static(e) => {...}
// match item {
// ForeignItem::Fn(item) => {...}
// ForeignItem::Static(item) => {...}
// ...
// ForeignItem::Verbatim(e) => {...}
// ForeignItem::Verbatim(item) => {...}
//
// #[cfg(test)]
// ForeignItem::__TestExhaustive(_) => unimplemented!(),
Expand Down Expand Up @@ -694,11 +694,11 @@ ast_enum_of_structs! {
// The following is the only supported idiom for exhaustive matching of
// this enum.
//
// match expr {
// TraitItem::Const(e) => {...}
// TraitItem::Method(e) => {...}
// match item {
// TraitItem::Const(item) => {...}
// TraitItem::Method(item) => {...}
// ...
// TraitItem::Verbatim(e) => {...}
// TraitItem::Verbatim(item) => {...}
//
// #[cfg(test)]
// TraitItem::__TestExhaustive(_) => unimplemented!(),
Expand Down Expand Up @@ -807,11 +807,11 @@ ast_enum_of_structs! {
// The following is the only supported idiom for exhaustive matching of
// this enum.
//
// match expr {
// ImplItem::Const(e) => {...}
// ImplItem::Method(e) => {...}
// match item {
// ImplItem::Const(item) => {...}
// ImplItem::Method(item) => {...}
// ...
// ImplItem::Verbatim(e) => {...}
// ImplItem::Verbatim(item) => {...}
//
// #[cfg(test)]
// ImplItem::__TestExhaustive(_) => unimplemented!(),
Expand Down
8 changes: 4 additions & 4 deletions src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ ast_enum_of_structs! {
// The following is the only supported idiom for exhaustive matching of
// this enum.
//
// match expr {
// Pat::Box(e) => {...}
// Pat::Ident(e) => {...}
// match pat {
// Pat::Box(pat) => {...}
// Pat::Ident(pat) => {...}
// ...
// Pat::Wild(e) => {...}
// Pat::Wild(pat) => {...}
//
// #[cfg(test)]
// Pat::__TestExhaustive(_) => unimplemented!(),
Expand Down
8 changes: 4 additions & 4 deletions src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ ast_enum_of_structs! {
// The following is the only supported idiom for exhaustive matching of
// this enum.
//
// match expr {
// Type::Array(e) => {...}
// Type::BareFn(e) => {...}
// match ty {
// Type::Array(ty) => {...}
// Type::BareFn(ty) => {...}
// ...
// Type::Verbatim(e) => {...}
// Type::Verbatim(ty) => {...}
//
// #[cfg(test)]
// Type::__TestExhaustive(_) => unimplemented!(),
Expand Down

0 comments on commit d545093

Please sign in to comment.