about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorWeihang Lo <me@weihanglo.tw>2023-08-28 20:28:51 +0100
committerWeihang Lo <me@weihanglo.tw>2023-08-30 19:24:44 +0100
commita11805ae46b23d1cc80f7332417cb809ff1c6d64 (patch)
tree21f88a78624a0b3f87cc3a9d7dc7303e8c971192 /tests/ui/error-codes
parentcdbad43aba4805ca67de043dd74f617ce5f982a4 (diff)
downloadrust-a11805ae46b23d1cc80f7332417cb809ff1c6d64.tar.gz
rust-a11805ae46b23d1cc80f7332417cb809ff1c6d64.zip
feat(rustc_lint): make `CheckLintName` respect lint level
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0602.rs2
-rw-r--r--tests/ui/error-codes/E0602.stderr11
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/ui/error-codes/E0602.rs b/tests/ui/error-codes/E0602.rs
index 8fadce526d9..77d28838a10 100644
--- a/tests/ui/error-codes/E0602.rs
+++ b/tests/ui/error-codes/E0602.rs
@@ -1,6 +1,8 @@
 // compile-flags:-D bogus
+// check-pass
 
 // error-pattern:E0602
 // error-pattern:requested on the command line with `-D bogus`
+// error-pattern:`#[warn(unknown_lints)]` on by default
 
 fn main() {}
diff --git a/tests/ui/error-codes/E0602.stderr b/tests/ui/error-codes/E0602.stderr
index 2b372263345..60ecec7cdd7 100644
--- a/tests/ui/error-codes/E0602.stderr
+++ b/tests/ui/error-codes/E0602.stderr
@@ -1,11 +1,16 @@
-error[E0602]: unknown lint: `bogus`
+warning[E0602]: unknown lint: `bogus`
    |
    = note: requested on the command line with `-D bogus`
+   = note: `#[warn(unknown_lints)]` on by default
 
-error[E0602]: unknown lint: `bogus`
+warning[E0602]: unknown lint: `bogus`
    |
    = note: requested on the command line with `-D bogus`
 
-error: aborting due to 2 previous errors
+warning[E0602]: unknown lint: `bogus`
+   |
+   = note: requested on the command line with `-D bogus`
+
+warning: 3 warnings emitted
 
 For more information about this error, try `rustc --explain E0602`.