rust/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs
2024-06-25 17:22:22 +02:00

13 lines
296 B
Rust

//@ check-pass
// this test makes sure that the `unfulfilled_lint_expectations` lint
// is being emited for `foo` as foo is not dead code, it's pub
#![warn(dead_code)] // to override compiletest
#[expect(dead_code)]
//~^ WARN this lint expectation is unfulfilled
pub fn foo() {}
fn main() {}