Skip to content

Commit 9b8ce0d

Browse files
committed
libsyntax: Remove a mutable field from the tests. rs=demuting
1 parent 6439e28 commit 9b8ce0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libsyntax/ext/auto_encode.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,9 +1176,9 @@ mod test {
11761176
// all of the ones I was too lazy to handle:
11771177
CallToOther
11781178
}
1179-
// using a mutable field rather than changing the
1179+
// using `@mut` rather than changing the
11801180
// type of self in every method of every encoder everywhere.
1181-
pub struct TestEncoder {mut call_log : ~[call]}
1181+
pub struct TestEncoder {call_log : @mut ~[call]}
11821182
11831183
pub impl TestEncoder {
11841184
// these self's should be &mut self's, as well....
@@ -1272,9 +1272,9 @@ mod test {
12721272
struct Node {id: uint}
12731273
12741274
fn to_call_log (val: Encodable<TestEncoder>) -> ~[call] {
1275-
let mut te = TestEncoder {call_log: ~[]};
1275+
let mut te = TestEncoder {call_log: @mut ~[]};
12761276
val.encode(&te);
1277-
te.call_log
1277+
copy *te.call_log
12781278
}
12791279
/*
12801280
#[test] fn encode_test () {

0 commit comments

Comments
 (0)