summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs')
-rw-r--r--src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs b/src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs
deleted file mode 100644
index a3c3933d7..000000000
--- a/src/test/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// compile-flags: --force-warn while_true
-// compile-flags: --force-warn unused_variables
-// compile-flags: --force-warn unused_mut
-// check-pass
-
-#![feature(lint_reasons)]
-
-fn expect_early_pass_lint() {
- #[expect(while_true)]
- while true {
- //~^ WARNING denote infinite loops with `loop { ... }` [while_true]
- //~| NOTE requested on the command line with `--force-warn while-true`
- //~| HELP use `loop`
- println!("I never stop")
- }
-}
-
-#[expect(unused_variables, reason="<this should fail and display this reason>")]
-fn check_specific_lint() {
- let x = 2;
- //~^ WARNING unused variable: `x` [unused_variables]
- //~| NOTE requested on the command line with `--force-warn unused-variables`
- //~| HELP if this is intentional, prefix it with an underscore
-}
-
-#[expect(unused)]
-fn check_multiple_lints_with_lint_group() {
- let fox_name = "Sir Nibbles";
- //~^ WARNING unused variable: `fox_name` [unused_variables]
- //~| HELP if this is intentional, prefix it with an underscore
-
- let mut what_does_the_fox_say = "*ding* *deng* *dung*";
- //~^ WARNING variable does not need to be mutable [unused_mut]
- //~| NOTE requested on the command line with `--force-warn unused-mut`
- //~| HELP remove this `mut`
-
- println!("The fox says: {what_does_the_fox_say}");
-}
-
-#[allow(unused_variables)]
-fn check_expect_overrides_allow_lint_level() {
- #[expect(unused_variables)]
- let this_should_fulfill_the_expectation = "The `#[allow]` has no power here";
- //~^ WARNING unused variable: `this_should_fulfill_the_expectation` [unused_variables]
- //~| HELP if this is intentional, prefix it with an underscore
-}
-
-fn main() {}