2024-02-16 14:02:50 -06:00
|
|
|
//@ check-pass
|
|
|
|
//@ revisions: allow expect
|
2023-08-10 12:23:17 -05:00
|
|
|
|
|
|
|
// 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() {}
|