about summary refs log tree commit diff
path: root/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs
blob: c4476e43e1ffc7127941d51acb29f404e8cc8a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ check-pass

// this test makes sure that the `unfulfilled_lint_expectations` lint
// is being emitted 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() {}