]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/cli-lint-override.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / cli-lint-override.rs
1 // Tests that subsequent lints specified via the command line override
2 // each other, except for ForceWarn and Forbid, which cannot be overridden.
3 //
4 // revisions: warn_deny forbid_warn force_warn_deny
5 //
6 //[warn_deny] compile-flags: --warn missing_abi --deny missing_abi
7 //[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi
8 //[force_warn_deny] compile-flags: --force-warn missing_abi --allow missing_abi
9 //[force_warn_deny] check-pass
10
11
12 extern fn foo() {}
13 //[warn_deny]~^ ERROR extern declarations without an explicit ABI are deprecated
14 //[forbid_warn]~^^ ERROR extern declarations without an explicit ABI are deprecated
15 //[force_warn_deny]~^^^ WARN extern declarations without an explicit ABI are deprecated
16
17 fn main() {}