b0VIM 7.4 V*4UX�- erickt Erick-Tryzelaar-MBP.local ~erickt/projects/rust/rust/src/libsyntax/ext/deriving/cmp/partial_eq.rs utf-8
3210 #"! U tp ^ ad � ^ � � ] Z � � R . - �
�
�
�
}
[
O
N
� � � L J � n ] = �
�
9
&
%
� � � � ^ � � � � x D � � t a `
� � � X : 4 3 � � q Y < � � o L � � � � � � � � t T ! � � � � } r L E R } trait_def.expand(cx, mitem, item, push) }; associated_types: Vec::new(), ), md!("ne", cs_ne) md!("eq", cs_eq), methods: vec!( generics: LifetimeBounds::empty(), additional_bounds: Vec::new(), path: path_std!(cx, core::cmp::PartialEq), attributes: Vec::new(), span: span, let trait_def = TraitDef { } } } } })) $f(a, b, c) combine_substructure: combine_substructure(Box::new(|a, b, c| { attributes: attrs, ret_ty: Literal(path_local!(bool)), args: vec!(borrowed_self()), explicit_self: borrowed_explicit_self(), generics: LifetimeBounds::empty(), name: $name, MethodDef { let attrs = vec!(cx.attribute(span, inline)); let inline = cx.meta_word(span, InternedString::new("inline")); ($name:expr, $f:ident) => { { macro_rules! md { } cx, span, substr) Box::new(|cx, span, _, _| cx.expr_bool(span, true)), cx.expr_bool(span, false), }, cx.expr_binary(span, ast::BiOr, subexpr, eq) let eq = cx.expr_binary(span, ast::BiNe, self_f, other_f.clone()); }; _ => cx.span_bug(span, "not exactly 2 arguments in `derive(PartialEq)`") (1, Some(o_f)) => o_f, let other_f = match (other_fs.len(), other_fs.get(0)) { |cx, span, subexpr, self_f, other_fs| { true, // use foldl cs_fold( fn cs_ne(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> { } cx, span, substr) Box::new(|cx, span, _, _| cx.expr_bool(span, false)), cx.expr_bool(span, true), }, cx.expr_binary(span, ast::BiAnd, subexpr, eq) let eq = cx.expr_binary(span, ast::BiEq, self_f, other_f.clone()); }; _ => cx.span_bug(span, "not exactly 2 arguments in `derive(PartialEq)`") (1, Some(o_f)) => o_f, let other_f = match (other_fs.len(), other_fs.get(0)) { |cx, span, subexpr, self_f, other_fs| { true, // use foldl cs_fold( fn cs_eq(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> { // any fields are not equal or if the enum variants are different // structures are equal if all fields are equal, and non equal, if { push: &mut FnMut(P<Item>)) item: &Item, mitem: &MetaItem, span: Span, pub fn expand_deriving_partial_eq(cx: &mut ExtCtxt, use ptr::P; use parse::token::InternedString; use ext::deriving::generic::ty::*; use ext::deriving::generic::*; use ext::build::AstBuilder; use ext::base::ExtCtxt; use codemap::Span; use ast::{MetaItem, Item, Expr, self}; // except according to those terms. // option. This file may not be copied, modified, or distributed // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or //