@@ -63,7 +63,7 @@ pub fn modify_for_testing(sess: session::Session,
63
63
}
64
64
65
65
struct TestHarnessGenerator {
66
- cx : @mut TestCtxt ,
66
+ cx : @TestCtxt ,
67
67
}
68
68
69
69
impl fold:: ast_fold for TestHarnessGenerator {
@@ -126,7 +126,7 @@ impl fold::ast_fold for TestHarnessGenerator {
126
126
// Remove any #[main] from the AST so it doesn't clash with
127
127
// the one we're going to add. Only if compiling an executable.
128
128
129
- fn nomain ( cx : @mut TestCtxt , item : @ast:: item ) -> @ast:: item {
129
+ fn nomain ( cx : @TestCtxt , item : @ast:: item ) -> @ast:: item {
130
130
if !* cx. sess . building_library {
131
131
@ast:: item {
132
132
attrs : item. attrs . iter ( ) . filter_map ( |attr| {
@@ -154,7 +154,7 @@ impl fold::ast_fold for TestHarnessGenerator {
154
154
155
155
fn generate_test_harness ( sess : session:: Session , crate : ast:: Crate )
156
156
-> ast:: Crate {
157
- let cx: @mut TestCtxt = @mut TestCtxt {
157
+ let cx: @TestCtxt = @TestCtxt {
158
158
sess : sess,
159
159
ext_cx : ExtCtxt :: new ( sess. parse_sess , sess. opts . cfg . clone ( ) ) ,
160
160
path : RefCell :: new ( ~[ ] ) ,
@@ -190,7 +190,7 @@ fn strip_test_functions(crate: ast::Crate) -> ast::Crate {
190
190
} )
191
191
}
192
192
193
- fn is_test_fn ( cx : @mut TestCtxt , i : @ast:: item ) -> bool {
193
+ fn is_test_fn ( cx : @TestCtxt , i : @ast:: item ) -> bool {
194
194
let has_test_attr = attr:: contains_name ( i. attrs , "test" ) ;
195
195
196
196
fn has_test_signature ( i : @ast:: item ) -> bool {
@@ -243,7 +243,7 @@ fn is_bench_fn(i: @ast::item) -> bool {
243
243
return has_bench_attr && has_test_signature ( i) ;
244
244
}
245
245
246
- fn is_ignored ( cx : @mut TestCtxt , i : @ast:: item ) -> bool {
246
+ fn is_ignored ( cx : @TestCtxt , i : @ast:: item ) -> bool {
247
247
i. attrs . iter ( ) . any ( |attr| {
248
248
// check ignore(cfg(foo, bar))
249
249
"ignore" == attr. name ( ) && match attr. meta_item_list ( ) {
0 commit comments