Auto merge of #27025 - dotdash:issue-26484, r=pnkfelix
See the commits for details r? @arielb1
This commit is contained in:
commit
39d4faf989
4 changed files with 84 additions and 28 deletions
|
|
@ -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(); }
|
||||
}
|
||||
|
|
|
|||
20
src/test/run-pass/issue-26484.rs
Normal file
20
src/test/run-pass/issue-26484.rs
Normal file
|
|
@ -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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue