about summary refs log tree commit diff
path: root/tests/ui/lint/cli-unknown-force-warn.rs
blob: 330d5570e21bf43f19c76387583ebfd8e1afc97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Checks that rustc correctly errors when passed an invalid lint with
// `--force-warn`. This is a regression test for issue #86958.

//@ check-pass
//@ compile-flags: --force-warn foo-qux

//@ error-pattern: requested on the command line with `--force-warn foo_qux`
//@ error-pattern: `#[warn(unknown_lints)]` on by default

fn main() {}

//~? WARN unknown lint: `foo_qux`
//~? WARN unknown lint: `foo_qux`
//~? WARN unknown lint: `foo_qux`