Skip to content

Commit 32763ca

Browse files
committed
auto_serialize should use explicit refs (fixes #4044)
1 parent cd6300e commit 32763ca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/libsyntax/ext/auto_serialize.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ priv impl ext_ctxt {
265265
let path = @{span: span, global: false, idents: ~[nm],
266266
rp: None, types: ~[]};
267267
@{id: self.next_id(),
268-
node: ast::pat_ident(ast::bind_by_implicit_ref,
268+
node: ast::pat_ident(ast::bind_by_ref(ast::m_imm),
269269
path,
270270
None),
271271
span: span}
@@ -887,7 +887,7 @@ fn ser_variant(
887887

888888
let pat_node = if pats.is_empty() {
889889
ast::pat_ident(
890-
ast::bind_by_implicit_ref,
890+
ast::bind_by_ref(ast::m_imm),
891891
cx.path(span, ~[v_name]),
892892
None
893893
)

src/test/run-pass/auto_serialize.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#[forbid(deprecated_pattern)];
2+
13
extern mod std;
24

35
// These tests used to be separate files, but I wanted to refactor all
@@ -32,7 +34,7 @@ fn test_ebml<A:
3234
let ebml_w = &EBWriter::Serializer(wr);
3335
a1.serialize(ebml_w)
3436
};
35-
let d = EBReader::Doc(@bytes);
37+
let d = EBReader::Doc(@move bytes);
3638
let a2: A = deserialize(&EBReader::Deserializer(d));
3739
assert *a1 == a2;
3840
}

0 commit comments

Comments
 (0)