1
Fork 0

Fix some of the __names in the comments

This commit is contained in:
James Sanderson 2018-04-19 20:17:06 +01:00
parent b9b650c412
commit 1a72d6dcd1
3 changed files with 13 additions and 13 deletions

View file

@ -77,9 +77,9 @@ pub fn cs_cmp(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {
// ::std::cmp::Ordering::Equal => { // ::std::cmp::Ordering::Equal => {
// ... // ...
// } // }
// __cmp => __cmp // cmp => cmp
// }, // },
// __cmp => __cmp // cmp => cmp
// } // }
// //
cs_fold(// foldr nests the if-elses correctly, leaving the first field cs_fold(// foldr nests the if-elses correctly, leaving the first field
@ -88,7 +88,7 @@ pub fn cs_cmp(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {
|cx, span, old, self_f, other_fs| { |cx, span, old, self_f, other_fs| {
// match new { // match new {
// ::std::cmp::Ordering::Equal => old, // ::std::cmp::Ordering::Equal => old,
// __cmp => __cmp // cmp => cmp
// } // }
let new = { let new = {

View file

@ -138,9 +138,9 @@ pub fn cs_partial_cmp(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<
// ::std::option::Option::Some(::std::cmp::Ordering::Equal) => { // ::std::option::Option::Some(::std::cmp::Ordering::Equal) => {
// ... // ...
// } // }
// __cmp => __cmp // cmp => cmp
// }, // },
// __cmp => __cmp // cmp => cmp
// } // }
// //
cs_fold(// foldr nests the if-elses correctly, leaving the first field cs_fold(// foldr nests the if-elses correctly, leaving the first field
@ -149,7 +149,7 @@ pub fn cs_partial_cmp(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<
|cx, span, old, self_f, other_fs| { |cx, span, old, self_f, other_fs| {
// match new { // match new {
// Some(::std::cmp::Ordering::Equal) => old, // Some(::std::cmp::Ordering::Equal) => old,
// __cmp => __cmp // cmp => cmp
// } // }
let new = { let new = {

View file

@ -1004,10 +1004,10 @@ impl<'a> MethodDef<'a> {
/// ///
/// // equivalent to: /// // equivalent to:
/// impl PartialEq for A { /// impl PartialEq for A {
/// fn eq(&self, __arg_1: &A) -> bool { /// fn eq(&self, other: &A) -> bool {
/// match *self { /// match *self {
/// A {x: ref __self_0_0, y: ref __self_0_1} => { /// A {x: ref __self_0_0, y: ref __self_0_1} => {
/// match *__arg_1 { /// match *other {
/// A {x: ref __self_1_0, y: ref __self_1_1} => { /// A {x: ref __self_1_0, y: ref __self_1_1} => {
/// __self_0_0.eq(__self_1_0) && __self_0_1.eq(__self_1_1) /// __self_0_0.eq(__self_1_0) && __self_0_1.eq(__self_1_1)
/// } /// }
@ -1020,10 +1020,10 @@ impl<'a> MethodDef<'a> {
/// // or if A is repr(packed) - note fields are matched by-value /// // or if A is repr(packed) - note fields are matched by-value
/// // instead of by-reference. /// // instead of by-reference.
/// impl PartialEq for A { /// impl PartialEq for A {
/// fn eq(&self, __arg_1: &A) -> bool { /// fn eq(&self, other: &A) -> bool {
/// match *self { /// match *self {
/// A {x: __self_0_0, y: __self_0_1} => { /// A {x: __self_0_0, y: __self_0_1} => {
/// match __arg_1 { /// match other {
/// A {x: __self_1_0, y: __self_1_1} => { /// A {x: __self_1_0, y: __self_1_1} => {
/// __self_0_0.eq(&__self_1_0) && __self_0_1.eq(&__self_1_1) /// __self_0_0.eq(&__self_1_0) && __self_0_1.eq(&__self_1_1)
/// } /// }
@ -1134,14 +1134,14 @@ impl<'a> MethodDef<'a> {
/// // is equivalent to /// // is equivalent to
/// ///
/// impl PartialEq for A { /// impl PartialEq for A {
/// fn eq(&self, __arg_1: &A) -> ::bool { /// fn eq(&self, other: &A) -> ::bool {
/// match (&*self, &*__arg_1) { /// match (&*self, &*other) {
/// (&A1, &A1) => true, /// (&A1, &A1) => true,
/// (&A2(ref self_0), /// (&A2(ref self_0),
/// &A2(ref __arg_1_0)) => (*self_0).eq(&(*__arg_1_0)), /// &A2(ref __arg_1_0)) => (*self_0).eq(&(*__arg_1_0)),
/// _ => { /// _ => {
/// let __self_vi = match *self { A1(..) => 0, A2(..) => 1 }; /// let __self_vi = match *self { A1(..) => 0, A2(..) => 1 };
/// let __arg_1_vi = match *__arg_1 { A1(..) => 0, A2(..) => 1 }; /// let __arg_1_vi = match *other { A1(..) => 0, A2(..) => 1 };
/// false /// false
/// } /// }
/// } /// }