about summary refs log tree commit diff
path: root/tests/ui/unreachable-code/boolean-negation-in-unreachable-code-7344.rs
blob: 8fd091872c310407fec50d5276fce48ad7094acf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// https://github.com/rust-lang/rust/issues/7344
//@ run-pass
#![allow(unused_must_use)]

#![allow(unreachable_code)]

fn foo() -> bool { false }

fn bar() {
    return;
    !foo();
}

fn baz() {
    return;
    if "" == "" {}
}

pub fn main() {
    bar();
    baz();
}