]> git.lizzy.rs Git - rust.git/blob - tests/ui/reachable/expr_return_in_macro.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / reachable / expr_return_in_macro.rs
1 // Tests that we generate nice error messages
2 // when an expression is unreachble due to control
3 // flow inside of a macro expansion.
4 #![deny(unreachable_code)]
5
6 macro_rules! early_return {
7     () => {
8         return ()
9     }
10 }
11
12 fn main() {
13     return early_return!();
14     //~^ ERROR unreachable expression
15 }