]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/mir_codegen_no_landing_pads.rs
Use better bound names in `-Zverbose` mode
[rust.git] / src / test / run-fail / mir_codegen_no_landing_pads.rs
1 // compile-flags: -Z no-landing-pads -C codegen-units=1
2 // error-pattern:converging_fn called
3 // ignore-cloudabi no std::process
4
5 use std::io::{self, Write};
6
7 struct Droppable;
8 impl Drop for Droppable {
9     fn drop(&mut self) {
10         ::std::process::exit(1)
11     }
12 }
13
14 fn converging_fn() {
15     panic!("converging_fn called")
16 }
17
18 fn mir(d: Droppable) {
19     let x = Droppable;
20     converging_fn();
21     drop(x);
22     drop(d);
23 }
24
25 fn main() {
26     mir(Droppable);
27 }