提交 7ccc97e5 编写于 作者: C Corey Richardson

Fix ICE in macros

上级 b6a0d40c
......@@ -118,10 +118,13 @@ fn red(ad: @named_match, idx: &uint) -> @named_match {
}
fn lookup_cur_matched(r: &mut TtReader, name: ident) -> @named_match {
// FIXME (#3850): this looks a bit silly with an extra scope.
let start;
{ start = *r.interpolations.get(&name); }
return lookup_cur_matched_by_matched(r, start);
match r.interpolations.find_copy(&name) {
Some(s) => lookup_cur_matched_by_matched(r, s),
None => {
r.sp_diag.span_fatal(r.cur_span, fmt!("unknown macro variable `%s`",
*r.interner.get(name)));
}
}
}
enum lis {
lis_unconstrained, lis_constraint(uint, ident), lis_contradiction(~str)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册