Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
This updates tests to reflect that `force-warn` is now stable.
  • Loading branch information
inquisitivecrystal authored and Mark-Simulacrum committed Aug 24, 2021
1 parent 228a5f4 commit 1f3170c
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/test/run-make/unstable-flag-required/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/test/run-make/unstable-flag-required/force-warn.stderr

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/ui/lint/cli-lint-override.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/cli-unknown-force-warn.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 1 addition & 5 deletions src/test/ui/lint/cli-unknown-force-warn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/test/ui/lint/force-warn/allow-warnings.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/force-warn/allowed-by-default-lint.rs
Original file line number Diff line number Diff line change
@@ -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> {
Expand Down
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/force-warn/cap-lints-allow.rs
Original file line number Diff line number Diff line change
@@ -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 {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/force-warn/deny-by-default-lint.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/force-warn/lint-group-allow-warnings.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down

0 comments on commit 1f3170c

Please sign in to comment.