Skip to content

Commit bb4fe5b

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 171818 b: refs/heads/beta c: bd9eef7 h: refs/heads/master v: v3
1 parent 876d95b commit bb4fe5b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 98fda878d8d109c7b3337593d5396a3b893aa966
34+
refs/heads/beta: bd9eef7ac64b4263c9db25d74b7cc57958909ddc
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/librustc/metadata/decoder.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -662,27 +662,27 @@ pub fn get_item_path(cdata: Cmd, id: ast::NodeId) -> Vec<ast_map::PathElem> {
662662
item_path(lookup_item(id, cdata.data()))
663663
}
664664

665-
pub type DecodeInlinedItem<'a> = for<'tcx> |cdata: Cmd,
666-
tcx: &ty::ctxt<'tcx>,
667-
path: Vec<ast_map::PathElem>,
668-
par_doc: rbml::Doc|: 'a
669-
-> Result<&'tcx ast::InlinedItem,
670-
Vec<ast_map::PathElem>>;
665+
pub type DecodeInlinedItem<'a> =
666+
Box<for<'tcx> FnMut(Cmd,
667+
&ty::ctxt<'tcx>,
668+
Vec<ast_map::PathElem>,
669+
rbml::Doc)
670+
-> Result<&'tcx ast::InlinedItem, Vec<ast_map::PathElem>> + 'a>;
671671

672672
pub fn maybe_get_item_ast<'tcx>(cdata: Cmd, tcx: &ty::ctxt<'tcx>, id: ast::NodeId,
673-
decode_inlined_item: DecodeInlinedItem)
673+
mut decode_inlined_item: DecodeInlinedItem)
674674
-> csearch::found_ast<'tcx> {
675675
debug!("Looking up item: {}", id);
676676
let item_doc = lookup_item(id, cdata.data());
677677
let path = item_path(item_doc).init().to_vec();
678-
match decode_inlined_item(cdata, tcx, path, item_doc) {
678+
match decode_inlined_item.call_mut((cdata, tcx, path, item_doc)) {
679679
Ok(ii) => csearch::found(ii),
680680
Err(path) => {
681681
match item_parent_item(item_doc) {
682682
Some(did) => {
683683
let did = translate_def_id(cdata, did);
684684
let parent_item = lookup_item(did.node, cdata.data());
685-
match decode_inlined_item(cdata, tcx, path, parent_item) {
685+
match decode_inlined_item.call_mut((cdata, tcx, path, parent_item)) {
686686
Ok(ii) => csearch::found_parent(did, ii),
687687
Err(_) => csearch::not_found
688688
}

branches/beta/src/librustc/middle/const_eval.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn lookup_variant_by_id<'a>(tcx: &'a ty::ctxt,
132132
None => {}
133133
}
134134
let expr_id = match csearch::maybe_get_item_ast(tcx, enum_def,
135-
|a, b, c, d| astencode::decode_inlined_item(a, b, c, d)) {
135+
box |a, b, c, d| astencode::decode_inlined_item(a, b, c, d)) {
136136
csearch::found(&ast::IIItem(ref item)) => match item.node {
137137
ast::ItemEnum(ast::EnumDef { ref variants }, _) => {
138138
// NOTE this doesn't do the right thing, it compares inlined
@@ -172,7 +172,7 @@ pub fn lookup_const_by_id<'a>(tcx: &'a ty::ctxt, def_id: ast::DefId)
172172
None => {}
173173
}
174174
let expr_id = match csearch::maybe_get_item_ast(tcx, def_id,
175-
|a, b, c, d| astencode::decode_inlined_item(a, b, c, d)) {
175+
box |a, b, c, d| astencode::decode_inlined_item(a, b, c, d)) {
176176
csearch::found(&ast::IIItem(ref item)) => match item.node {
177177
ast::ItemConst(_, ref const_expr) => Some(const_expr.id),
178178
_ => None

branches/beta/src/librustc_trans/trans/inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: ast::DefId)
4040
let csearch_result =
4141
csearch::maybe_get_item_ast(
4242
ccx.tcx(), fn_id,
43-
|a,b,c,d| astencode::decode_inlined_item(a, b, c, d));
43+
box |a,b,c,d| astencode::decode_inlined_item(a, b, c, d));
4444

4545
let inline_def = match csearch_result {
4646
csearch::not_found => {

0 commit comments

Comments
 (0)