summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs
blob: 24fafa3d1b8042b1b230278640db02df73f71052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// check-pass
// revisions: allow expect

// this test checks that no matter if we put #[allow(dead_code)]
// or #[expect(dead_code)], no warning is being emited

#![feature(lint_reasons)]
#![warn(dead_code)] // to override compiletest

fn f() {}

#[cfg_attr(allow, allow(dead_code))]
#[cfg_attr(expect, expect(dead_code))]
fn g() {
    f();
}

fn main() {}