Skip to content

Commit c96a767

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 170724 b: refs/heads/try c: bd9eef7 h: refs/heads/master v: v3
1 parent e59f6c5 commit c96a767

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 73a25f55ad748b4d3516417c711b99ce446591af
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
5-
refs/heads/try: 98fda878d8d109c7b3337593d5396a3b893aa966
5+
refs/heads/try: bd9eef7ac64b4263c9db25d74b7cc57958909ddc
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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/try/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/try/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)