diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-05-17 21:27:17 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-05-22 00:04:10 +1000 |
| commit | 4045da9f4f7290b02bee52caa42504e4ce5406f7 (patch) | |
| tree | b29a484fe04e1c301fb33b9673f01087219bb71a /src/libsyntax/ext/deriving/cmp | |
| parent | eea265ea165cb0e6fa989a3712efd701456b265d (diff) | |
| download | rust-4045da9f4f7290b02bee52caa42504e4ce5406f7.tar.gz rust-4045da9f4f7290b02bee52caa42504e4ce5406f7.zip | |
syntax/ext: modernise ext_ctxt to be CamelCase and use new.
Diffstat (limited to 'src/libsyntax/ext/deriving/cmp')
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/eq.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/ord.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/totaleq.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/totalord.rs | 8 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/libsyntax/ext/deriving/cmp/eq.rs b/src/libsyntax/ext/deriving/cmp/eq.rs index e6fcfdf5563..197366b09ae 100644 --- a/src/libsyntax/ext/deriving/cmp/eq.rs +++ b/src/libsyntax/ext/deriving/cmp/eq.rs @@ -10,21 +10,21 @@ use ast::{meta_item, item, expr}; use codemap::span; -use ext::base::ext_ctxt; +use ext::base::ExtCtxt; use ext::build; use ext::deriving::generic::*; -pub fn expand_deriving_eq(cx: @ext_ctxt, +pub fn expand_deriving_eq(cx: @ExtCtxt, span: span, mitem: @meta_item, in_items: ~[@item]) -> ~[@item] { // structures are equal if all fields are equal, and non equal, if // any fields are not equal or if the enum variants are different - fn cs_eq(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr { + fn cs_eq(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr { cs_and(|cx, span, _, _| build::mk_bool(cx, span, false), cx, span, substr) } - fn cs_ne(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr { + fn cs_ne(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr { cs_or(|cx, span, _, _| build::mk_bool(cx, span, true), cx, span, substr) } diff --git a/src/libsyntax/ext/deriving/cmp/ord.rs b/src/libsyntax/ext/deriving/cmp/ord.rs index 5aae8454c09..29fc2c7271c 100644 --- a/src/libsyntax/ext/deriving/cmp/ord.rs +++ b/src/libsyntax/ext/deriving/cmp/ord.rs @@ -11,11 +11,11 @@ use ast::{meta_item, item, expr_if, expr}; use codemap::span; -use ext::base::ext_ctxt; +use ext::base::ExtCtxt; use ext::build; use ext::deriving::generic::*; -pub fn expand_deriving_ord(cx: @ext_ctxt, +pub fn expand_deriving_ord(cx: @ExtCtxt, span: span, mitem: @meta_item, in_items: ~[@item]) -> ~[@item] { @@ -55,7 +55,7 @@ pub fn expand_deriving_ord(cx: @ext_ctxt, /// `less`: is this `lt` or `le`? `equal`: is this `le` or `ge`? fn cs_ord(less: bool, equal: bool, - cx: @ext_ctxt, span: span, + cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr { let binop = if less { cx.ident_of("lt") diff --git a/src/libsyntax/ext/deriving/cmp/totaleq.rs b/src/libsyntax/ext/deriving/cmp/totaleq.rs index 9ab44f506ba..0ab99430d10 100644 --- a/src/libsyntax/ext/deriving/cmp/totaleq.rs +++ b/src/libsyntax/ext/deriving/cmp/totaleq.rs @@ -11,16 +11,16 @@ use ast::{meta_item, item, expr}; use codemap::span; -use ext::base::ext_ctxt; +use ext::base::ExtCtxt; use ext::build; use ext::deriving::generic::*; -pub fn expand_deriving_totaleq(cx: @ext_ctxt, +pub fn expand_deriving_totaleq(cx: @ExtCtxt, span: span, mitem: @meta_item, in_items: ~[@item]) -> ~[@item] { - fn cs_equals(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr { + fn cs_equals(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr { cs_and(|cx, span, _, _| build::mk_bool(cx, span, false), cx, span, substr) } diff --git a/src/libsyntax/ext/deriving/cmp/totalord.rs b/src/libsyntax/ext/deriving/cmp/totalord.rs index 1b6ea16b86e..2b4d8a28fbd 100644 --- a/src/libsyntax/ext/deriving/cmp/totalord.rs +++ b/src/libsyntax/ext/deriving/cmp/totalord.rs @@ -10,12 +10,12 @@ use ast::{meta_item, item, expr}; use codemap::span; -use ext::base::ext_ctxt; +use ext::base::ExtCtxt; use ext::build; use ext::deriving::generic::*; use core::cmp::{Ordering, Equal, Less, Greater}; -pub fn expand_deriving_totalord(cx: @ext_ctxt, +pub fn expand_deriving_totalord(cx: @ExtCtxt, span: span, mitem: @meta_item, in_items: ~[@item]) -> ~[@item] { @@ -41,7 +41,7 @@ pub fn expand_deriving_totalord(cx: @ext_ctxt, } -pub fn ordering_const(cx: @ext_ctxt, span: span, cnst: Ordering) -> @expr { +pub fn ordering_const(cx: @ExtCtxt, span: span, cnst: Ordering) -> @expr { let cnst = match cnst { Less => "Less", Equal => "Equal", @@ -53,7 +53,7 @@ pub fn ordering_const(cx: @ext_ctxt, span: span, cnst: Ordering) -> @expr { cx.ident_of(cnst)]) } -pub fn cs_cmp(cx: @ext_ctxt, span: span, +pub fn cs_cmp(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr { cs_same_method_fold( |
