Skip to content

Commit bc66961

Browse files
committed
---
yaml --- r: 220904 b: refs/heads/auto c: 3d65c7f h: refs/heads/master v: v3
1 parent d53b477 commit bc66961

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 9175a16bd8c5b37c485dfe36fea8f9df96e02bf0
11+
refs/heads/auto: 3d65c7ff849bea9cd44fc652396d50486396f867
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

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