Update tests
This updates tests to reflect that `force-warn` is now stable.
This commit is contained in:
parent
228a5f4096
commit
1f3170cf16
@ -2,4 +2,3 @@
|
||||
|
||||
all:
|
||||
$(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr
|
||||
$(RUSTC) --force-warn dead_code x.rs 2>&1 | diff - force-warn.stderr
|
||||
|
@ -1,2 +0,0 @@
|
||||
error: the `-Z unstable-options` flag must also be passed to enable the flag `--force-warn=lints`
|
||||
|
@ -5,7 +5,7 @@
|
||||
//
|
||||
//[warn_deny] compile-flags: --warn missing_abi --deny missing_abi
|
||||
//[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi
|
||||
//[force_warn_deny] compile-flags: -Z unstable-options --force-warn missing_abi --allow missing_abi
|
||||
//[force_warn_deny] compile-flags: --force-warn missing_abi --allow missing_abi
|
||||
//[force_warn_deny] check-pass
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Checks that rustc correctly errors when passed an invalid lint with
|
||||
// `--force-warn`. This is a regression test for issue #86958.
|
||||
//
|
||||
// compile-flags: -Z unstable-options --force-warn foo-qux
|
||||
// compile-flags: --force-warn foo-qux
|
||||
// error-pattern: unknown lint: `foo_qux`
|
||||
|
||||
fn main() {}
|
||||
|
@ -6,10 +6,6 @@ error[E0602]: unknown lint: `foo_qux`
|
||||
|
|
||||
= note: requested on the command line with `--force-warn foo_qux`
|
||||
|
||||
error[E0602]: unknown lint: `foo_qux`
|
||||
|
|
||||
= note: requested on the command line with `--force-warn foo_qux`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0602`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT causes $LINT (which is warn-by-default) to warn
|
||||
// despite allowing all warnings in module
|
||||
// compile-flags: --force-warn dead_code -Zunstable-options
|
||||
// compile-flags: --force-warn dead_code
|
||||
// check-pass
|
||||
|
||||
#![allow(warnings)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// --force-warn $LINT causes $LINT (which is allow-by-default) to warn
|
||||
// compile-flags: --force-warn elided_lifetimes_in_paths -Zunstable-options
|
||||
// compile-flags: --force-warn elided_lifetimes_in_paths
|
||||
// check-pass
|
||||
|
||||
struct Foo<'a> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT causes $LINT (which is deny-by-default) to warn
|
||||
// despite $LINT being allowed in module
|
||||
// compile-flags: --force-warn const_err -Zunstable-options
|
||||
// compile-flags: --force-warn const_err
|
||||
// check-pass
|
||||
|
||||
#![allow(const_err)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT causes $LINT (which is warn-by-default) to warn
|
||||
// despite $LINT_GROUP (which contains $LINT) being allowed
|
||||
// compile-flags: --force-warn bare_trait_objects -Zunstable-options
|
||||
// compile-flags: --force-warn bare_trait_objects
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT causes $LINT (which is warn-by-default) to warn
|
||||
// despite $LINT being allowed in module
|
||||
// compile-flags: --force-warn dead_code -Zunstable-options
|
||||
// compile-flags: --force-warn dead_code
|
||||
// check-pass
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT casuses $LINT to warn despite --cap-lints
|
||||
// set to allow
|
||||
// compile-flags: --cap-lints allow --force-warn bare_trait_objects -Zunstable-options
|
||||
// compile-flags: --cap-lints allow --force-warn bare_trait_objects
|
||||
// check-pass
|
||||
|
||||
pub trait SomeTrait {}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT_GROUP causes $LINT to warn despite $LINT being
|
||||
// allowed in module and cap-lints set to warn
|
||||
// compile-flags: --cap-lints warn --force-warn rust-2021-compatibility -Zunstable-options
|
||||
// compile-flags: --cap-lints warn --force-warn rust-2021-compatibility
|
||||
// check-pass
|
||||
#![allow(ellipsis_inclusive_range_patterns)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// --force-warn $LINT causes $LINT (which is deny-by-default) to warn
|
||||
// compile-flags: --force-warn const_err -Zunstable-options
|
||||
// compile-flags: --force-warn const_err
|
||||
// check-pass
|
||||
|
||||
const C: i32 = 1 / 0;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// --force-warn $LINT_GROUP causes $LINT in $LINT_GROUP to warn
|
||||
// despite all warnings being allowed in module
|
||||
// warn-by-default lint to warn
|
||||
// compile-flags: --force-warn nonstandard_style -Zunstable-options
|
||||
// compile-flags: --force-warn nonstandard_style
|
||||
// check-pass
|
||||
|
||||
#![allow(warnings)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT_GROUP causes $LINT to warn despite
|
||||
// $LINT_GROUP being allowed in module
|
||||
// compile-flags: --force-warn rust_2018_idioms -Zunstable-options
|
||||
// compile-flags: --force-warn rust_2018_idioms
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --force-warn $LINT_GROUP causes $LINT (which is warn-by-default) to warn
|
||||
// despite $LINT being allowed in module
|
||||
// compile-flags: --force-warn rust-2018-idioms -Zunstable-options
|
||||
// compile-flags: --force-warn rust-2018-idioms
|
||||
// check-pass
|
||||
|
||||
#![allow(bare_trait_objects)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user