Skip to content

Commit 29f5322

Browse files
committed
---
yaml --- r: 235593 b: refs/heads/stable c: 3d65c7f h: refs/heads/master i: 235591: c4f28da v: v3
1 parent f6de2b4 commit 29f5322

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
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 9175a16bd8c5b37c485dfe36fea8f9df96e02bf0
32+
refs/heads/stable: 3d65c7ff849bea9cd44fc652396d50486396f867
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

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