Skip to content

Commit e26875f

Browse files
committed
---
yaml --- r: 220734 b: refs/heads/master c: 3d65c7f h: refs/heads/master v: v3
1 parent 1610c3e commit e26875f

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,5 +1,5 @@
11
---
2-
refs/heads/master: 9175a16bd8c5b37c485dfe36fea8f9df96e02bf0
2+
refs/heads/master: 3d65c7ff849bea9cd44fc652396d50486396f867
33
refs/heads/snap-stage3: d4432b37378ec55450e06799f5344b4b0f4b94e0
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/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,

trunk/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)