Skip to content

Commit cdc4ca5

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 173612 b: refs/heads/master c: 28b0d40 h: refs/heads/master v: v3
1 parent 2f24270 commit cdc4ca5

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 86948adfdedb35051e55f41e865ee0ead6f53471
2+
refs/heads/master: 28b0d4029e3ae65505b19bf74379a8516b0e1fc9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 210f0dcf007104240b2e286ed0b80cb4a61d7bae
55
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c

trunk/src/libsyntax/ext/deriving/hash.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ fn hash_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
6565
[ref state_expr] => state_expr,
6666
_ => cx.span_bug(trait_span, "incorrect number of arguments in `deriving(Hash)`")
6767
};
68-
let hash_path = {
69-
let strs = vec![
70-
cx.ident_of("std"),
71-
cx.ident_of("hash"),
72-
cx.ident_of("Hash"),
73-
cx.ident_of("hash"),
74-
];
75-
76-
cx.expr_path(cx.path_global(trait_span, strs))
77-
};
7868
let call_hash = |&: span, thing_expr| {
69+
let hash_path = {
70+
let strs = vec![
71+
cx.ident_of("std"),
72+
cx.ident_of("hash"),
73+
cx.ident_of("Hash"),
74+
cx.ident_of("hash"),
75+
];
76+
77+
cx.expr_path(cx.path_global(span, strs))
78+
};
7979
let ref_thing = cx.expr_addr_of(span, thing_expr);
80-
let expr = cx.expr_call(span, hash_path.clone(), vec!(ref_thing, state_expr.clone()));
80+
let expr = cx.expr_call(span, hash_path, vec!(ref_thing, state_expr.clone()));
8181
cx.stmt_expr(expr)
8282
};
8383
let mut stmts = Vec::new();

trunk/src/test/compile-fail/issue-21160.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Bar {
1515
}
1616

1717
#[derive(Hash)]
18-
//~^ error: the trait `core::hash::Hash<__S>` is not implemented for the type `Bar`
1918
struct Foo(Bar);
19+
//~^ error: the trait `core::hash::Hash<__S>` is not implemented for the type `Bar`
2020

2121
fn main() {}

0 commit comments

Comments
 (0)