Skip to content

Commit 01830a6

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 169869 b: refs/heads/auto c: bd9eef7 h: refs/heads/master i: 169867: 943858a v: v3
1 parent 7b86c14 commit 01830a6

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
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 98fda878d8d109c7b3337593d5396a3b893aa966
13+
refs/heads/auto: bd9eef7ac64b4263c9db25d74b7cc57958909ddc
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

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