1 #![allow(unused_variables)]
2 #![allow(unused_assignments)]
3 #![allow(dead_code)]
4 #![deny(unreachable_code)]
5 
a()6 fn a() {
7     // Here the tail expression is considered unreachable:
8     let x = {
9         return;
10         22 //~ ERROR unreachable
11     };
12 }
13 
b()14 fn b() {
15     // Here the `x` assignment is considered unreachable, not the block:
16     let x = {
17         return;
18     };
19 }
20 
c()21 fn c() {
22     // Here the `println!` is unreachable:
23     let x = {
24         return;
25         println!("foo");
26         //~^ ERROR unreachable statement
27         22
28     };
29 }
30 
main()31 fn main() { }
32