diff options
| author | bors <bors@rust-lang.org> | 2015-07-20 15:04:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-20 15:04:15 +0000 |
| commit | 39d4faf989cea236e2e1669ab85d060d1c62cd85 (patch) | |
| tree | b09f28f9ef799f0f1378f3775446209519e7200d /src/test | |
| parent | 4e51763e6428580f2b3275cd7076492376801a1e (diff) | |
| parent | 3d65c7ff849bea9cd44fc652396d50486396f867 (diff) | |
| download | rust-39d4faf989cea236e2e1669ab85d060d1c62cd85.tar.gz rust-39d4faf989cea236e2e1669ab85d060d1c62cd85.zip | |
Auto merge of #27025 - dotdash:issue-26484, r=pnkfelix
See the commits for details r? @arielb1
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/debuginfo/basic-types-metadata.rs | 5 | ||||
| -rw-r--r-- | src/test/run-pass/issue-26484.rs | 20 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/test/debuginfo/basic-types-metadata.rs b/src/test/debuginfo/basic-types-metadata.rs index 0134a058c99..2468150a6a5 100644 --- a/src/test/debuginfo/basic-types-metadata.rs +++ b/src/test/debuginfo/basic-types-metadata.rs @@ -42,8 +42,10 @@ // gdb-check:type = f32 // gdb-command:whatis f64 // gdb-check:type = f64 +// gdb-command:whatis fnptr +// gdb-check:type = [...] (*)([...]) // gdb-command:info functions _yyy -// gdb-check:[...]![...]_yyy([...])([...]); +// gdb-check:[...]![...]_yyy([...]); // gdb-command:continue #![allow(unused_variables)] @@ -65,6 +67,7 @@ fn main() { let u64: u64 = 64; let f32: f32 = 2.5; let f64: f64 = 3.5; + let fnptr : fn() = _zzz; _zzz(); // #break if 1 == 1 { _yyy(); } } diff --git a/src/test/run-pass/issue-26484.rs b/src/test/run-pass/issue-26484.rs new file mode 100644 index 00000000000..d3e6fc85f13 --- /dev/null +++ b/src/test/run-pass/issue-26484.rs @@ -0,0 +1,20 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags:-g + +fn helper<F: FnOnce(usize) -> bool>(_f: F) { + print!(""); +} + +fn main() { + let cond = 0; + helper(|v| v == cond) +} |
