Skip to content

Commit 5b58345

Browse files
committed
---
yaml --- r: 228522 b: refs/heads/try c: 3d65c7f h: refs/heads/master v: v3
1 parent 3f5b8ce commit 5b58345

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 9175a16bd8c5b37c485dfe36fea8f9df96e02bf0
4+
refs/heads/try: 3d65c7ff849bea9cd44fc652396d50486396f867
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_trans/trans/debuginfo/metadata.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,8 +813,14 @@ pub fn type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
813813
}
814814
ty::TyClosure(def_id, substs) => {
815815
let infcx = infer::normalizing_infer_ctxt(cx.tcx(), &cx.tcx().tables);
816-
let sig = infcx.closure_type(def_id, substs).sig;
817-
subroutine_type_metadata(cx, unique_type_id, &sig, usage_site_span)
816+
let upvars = infcx.closure_upvars(def_id, substs).unwrap();
817+
let upvar_types = upvars.iter().map(|u| u.ty).collect::<Vec<_>>();
818+
819+
prepare_tuple_metadata(cx,
820+
t,
821+
&upvar_types[..],
822+
unique_type_id,
823+
usage_site_span).finalize(cx)
818824
}
819825
ty::TyStruct(def_id, substs) => {
820826
prepare_struct_metadata(cx,

branches/try/src/test/debuginfo/basic-types-metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// gdb-command:whatis f64
4444
// gdb-check:type = f64
4545
// gdb-command:whatis fnptr
46-
// gdb-check:type = void (*)(void)
46+
// gdb-check:type = [...] (*)([...])
4747
// gdb-command:info functions _yyy
4848
// gdb-check:[...]![...]_yyy([...]);
4949
// gdb-command:continue
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// compile-flags:-g
12+
13+
fn helper<F: FnOnce(usize) -> bool>(_f: F) {
14+
print!("");
15+
}
16+
17+
fn main() {
18+
let cond = 0;
19+
helper(|v| v == cond)
20+
}

0 commit comments

Comments
 (0)