mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
test: don't depend on locals being in scope on the return path.
This commit is contained in:
parent
6fa61b810d
commit
7fd2881ed4
@ -23,20 +23,22 @@
|
||||
// gdb-command:continue
|
||||
|
||||
#![allow(unused_variables)]
|
||||
#![feature(no_debug, rustc_attrs)]
|
||||
#![feature(no_debug)]
|
||||
#![feature(omit_gdb_pretty_printer_section)]
|
||||
#![omit_gdb_pretty_printer_section]
|
||||
|
||||
#[rustc_no_mir] // FIXME(#31005) MIR debuginfo is inaccurate for returns.
|
||||
#[inline(never)]
|
||||
fn id<T>(x: T) -> T {x}
|
||||
|
||||
fn function_with_debuginfo() {
|
||||
let abc = 10_usize;
|
||||
return (); // #break
|
||||
id(abc); // #break
|
||||
}
|
||||
|
||||
#[no_debug]
|
||||
fn function_without_debuginfo() {
|
||||
let abc = -57i32;
|
||||
return (); // #break
|
||||
id(abc); // #break
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user