]> git.lizzy.rs Git - rust.git/blob - tests/ui/mir/mir_codegen_calls_converging_drops.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / mir / mir_codegen_calls_converging_drops.rs
1 // run-fail
2 // error-pattern:converging_fn called
3 // error-pattern:0 dropped
4 // error-pattern:exit
5 // ignore-emscripten no processes
6
7 struct Droppable(u8);
8 impl Drop for Droppable {
9     fn drop(&mut self) {
10         eprintln!("{} dropped", self.0);
11     }
12 }
13
14 fn converging_fn() {
15     eprintln!("converging_fn called");
16 }
17
18 fn mir(d: Droppable) {
19     converging_fn();
20 }
21
22 fn main() {
23     let d = Droppable(0);
24     mir(d);
25     panic!("exit");
26 }