Use Vec for expectations to have a constant order (RFC-2383)

This commit is contained in:
xFrednet 2022-03-02 18:10:07 +01:00
parent defc056ccc
commit 5275d02433
No known key found for this signature in database
GPG key ID: FCDCBF29AF64D601
6 changed files with 31 additions and 33 deletions

View file

@ -7,13 +7,25 @@ LL | #[expect(unused_variables, unused_mut, while_true)]
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:28:10
--> $DIR/expect_multiple_lints.rs:10:40
|
LL | #[expect(unused_variables, unused_mut, while_true)]
| ^^^^^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:19:10
|
LL | #[expect(unused_variables, unused_mut, while_true)]
| ^^^^^^^^^^^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:19:10
--> $DIR/expect_multiple_lints.rs:19:40
|
LL | #[expect(unused_variables, unused_mut, while_true)]
| ^^^^^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:28:10
|
LL | #[expect(unused_variables, unused_mut, while_true)]
| ^^^^^^^^^^^^^^^^
@ -30,23 +42,11 @@ warning: this lint expectation is unfulfilled
LL | #[expect(unused, while_true)]
| ^^^^^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:19:40
|
LL | #[expect(unused_variables, unused_mut, while_true)]
| ^^^^^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:45:10
|
LL | #[expect(unused, while_true)]
| ^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_multiple_lints.rs:10:40
|
LL | #[expect(unused_variables, unused_mut, while_true)]
| ^^^^^^^^^^
warning: 8 warnings emitted

View file

@ -6,6 +6,7 @@
#[expect(
unused_mut,
//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
//~| NOTE `#[warn(unfulfilled_lint_expectations)]` on by default
//~| NOTE this `expect` is overridden by a `allow` attribute before the `unused_mut` lint is triggered
reason = "this `expect` is overridden by a `allow` attribute before the `unused_mut` lint is triggered"
)]
@ -22,7 +23,6 @@ mod foo {
#[expect(
unused_mut,
//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
//~| NOTE `#[warn(unfulfilled_lint_expectations)]` on by default
//~| NOTE this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered
reason = "this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered"
)]

View file

@ -25,23 +25,23 @@ note: the lint level is defined here
LL | unused_mut,
| ^^^^^^^^^^
warning: this lint expectation is unfulfilled
--> $DIR/expect_nested_lint_levels.rs:23:5
|
LL | unused_mut,
| ^^^^^^^^^^
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
= note: this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered
warning: this lint expectation is unfulfilled
--> $DIR/expect_nested_lint_levels.rs:7:5
|
LL | unused_mut,
| ^^^^^^^^^^
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
= note: this `expect` is overridden by a `allow` attribute before the `unused_mut` lint is triggered
warning: this lint expectation is unfulfilled
--> $DIR/expect_nested_lint_levels.rs:24:5
|
LL | unused_mut,
| ^^^^^^^^^^
|
= note: this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered
warning: this lint expectation is unfulfilled
--> $DIR/expect_nested_lint_levels.rs:43:10
|