]> git.lizzy.rs Git - rust.git/blob - src/test/ui/reachable/expr_return_in_macro.rs
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
[rust.git] / src / test / 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 }