]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/mir_codegen_calls_converging_drops.rs
Use better bound names in `-Zverbose` mode
[rust.git] / src / test / run-fail / mir_codegen_calls_converging_drops.rs
1 // error-pattern:converging_fn called
2 // error-pattern:0 dropped
3 // error-pattern:exit
4
5 struct Droppable(u8);
6 impl Drop for Droppable {
7     fn drop(&mut self) {
8         eprintln!("{} dropped", self.0);
9     }
10 }
11
12 fn converging_fn() {
13     eprintln!("converging_fn called");
14 }
15
16 fn mir(d: Droppable) {
17     converging_fn();
18 }
19
20 fn main() {
21     let d = Droppable(0);
22     mir(d);
23     panic!("exit");
24 }