mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Auto merge of #125741 - petrochenkov:atvisord, r=davidtwco
ast: Standardize visiting order for attributes and node IDs This should only affect `macro_rules` scopes and order of diagnostics. Also add a deprecation lint for `macro_rules` called outside of their scope, like in https://github.com/rust-lang/rust/issues/124535.
This commit is contained in:
commit
dfaa53fd58
3 changed files with 67 additions and 67 deletions
|
@ -1,11 +1,17 @@
|
||||||
|
error: `feature = "cargo-clippy"` was replaced by `clippy`
|
||||||
|
--> tests/ui/cfg_attr_cargo_clippy.rs:3:13
|
||||||
|
|
|
||||||
|
LL | #![cfg_attr(feature = "cargo-clippy", doc = "a")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `clippy`
|
||||||
|
|
|
||||||
|
= note: `-D clippy::deprecated-clippy-cfg-attr` implied by `-D warnings`
|
||||||
|
= help: to override `-D warnings` add `#[allow(clippy::deprecated_clippy_cfg_attr)]`
|
||||||
|
|
||||||
error: `feature = "cargo-clippy"` was replaced by `clippy`
|
error: `feature = "cargo-clippy"` was replaced by `clippy`
|
||||||
--> tests/ui/cfg_attr_cargo_clippy.rs:5:12
|
--> tests/ui/cfg_attr_cargo_clippy.rs:5:12
|
||||||
|
|
|
|
||||||
LL | #[cfg_attr(feature = "cargo-clippy", derive(Debug))]
|
LL | #[cfg_attr(feature = "cargo-clippy", derive(Debug))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `clippy`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `clippy`
|
||||||
|
|
|
||||||
= note: `-D clippy::deprecated-clippy-cfg-attr` implied by `-D warnings`
|
|
||||||
= help: to override `-D warnings` add `#[allow(clippy::deprecated_clippy_cfg_attr)]`
|
|
||||||
|
|
||||||
error: `feature = "cargo-clippy"` was replaced by `clippy`
|
error: `feature = "cargo-clippy"` was replaced by `clippy`
|
||||||
--> tests/ui/cfg_attr_cargo_clippy.rs:6:16
|
--> tests/ui/cfg_attr_cargo_clippy.rs:6:16
|
||||||
|
@ -37,11 +43,5 @@ error: `feature = "cargo-clippy"` was replaced by `clippy`
|
||||||
LL | #[cfg(all(feature = "cargo-clippy"))]
|
LL | #[cfg(all(feature = "cargo-clippy"))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `clippy`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `clippy`
|
||||||
|
|
||||||
error: `feature = "cargo-clippy"` was replaced by `clippy`
|
|
||||||
--> tests/ui/cfg_attr_cargo_clippy.rs:3:13
|
|
||||||
|
|
|
||||||
LL | #![cfg_attr(feature = "cargo-clippy", doc = "a")]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `clippy`
|
|
||||||
|
|
||||||
error: aborting due to 7 previous errors
|
error: aborting due to 7 previous errors
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,11 @@
|
||||||
error: using tabs in doc comments is not recommended
|
|
||||||
--> tests/ui/tabs_in_doc_comments.rs:10:9
|
|
||||||
|
|
|
||||||
LL | /// - First String:
|
|
||||||
| ^^^^ help: consider using four spaces per tab
|
|
||||||
|
|
|
||||||
= note: `-D clippy::tabs-in-doc-comments` implied by `-D warnings`
|
|
||||||
= help: to override `-D warnings` add `#[allow(clippy::tabs_in_doc_comments)]`
|
|
||||||
|
|
||||||
error: using tabs in doc comments is not recommended
|
|
||||||
--> tests/ui/tabs_in_doc_comments.rs:11:9
|
|
||||||
|
|
|
||||||
LL | /// - needs to be inside here
|
|
||||||
| ^^^^^^^^ help: consider using four spaces per tab
|
|
||||||
|
|
||||||
error: using tabs in doc comments is not recommended
|
|
||||||
--> tests/ui/tabs_in_doc_comments.rs:14:9
|
|
||||||
|
|
|
||||||
LL | /// - Second String:
|
|
||||||
| ^^^^ help: consider using four spaces per tab
|
|
||||||
|
|
||||||
error: using tabs in doc comments is not recommended
|
|
||||||
--> tests/ui/tabs_in_doc_comments.rs:15:9
|
|
||||||
|
|
|
||||||
LL | /// - needs to be inside here
|
|
||||||
| ^^^^^^^^ help: consider using four spaces per tab
|
|
||||||
|
|
||||||
error: using tabs in doc comments is not recommended
|
error: using tabs in doc comments is not recommended
|
||||||
--> tests/ui/tabs_in_doc_comments.rs:6:5
|
--> tests/ui/tabs_in_doc_comments.rs:6:5
|
||||||
|
|
|
|
||||||
LL | /// - first one
|
LL | /// - first one
|
||||||
| ^^^^ help: consider using four spaces per tab
|
| ^^^^ help: consider using four spaces per tab
|
||||||
|
|
|
||||||
|
= note: `-D clippy::tabs-in-doc-comments` implied by `-D warnings`
|
||||||
|
= help: to override `-D warnings` add `#[allow(clippy::tabs_in_doc_comments)]`
|
||||||
|
|
||||||
error: using tabs in doc comments is not recommended
|
error: using tabs in doc comments is not recommended
|
||||||
--> tests/ui/tabs_in_doc_comments.rs:6:13
|
--> tests/ui/tabs_in_doc_comments.rs:6:13
|
||||||
|
@ -49,5 +25,29 @@ error: using tabs in doc comments is not recommended
|
||||||
LL | /// - second one
|
LL | /// - second one
|
||||||
| ^^^^ help: consider using four spaces per tab
|
| ^^^^ help: consider using four spaces per tab
|
||||||
|
|
||||||
|
error: using tabs in doc comments is not recommended
|
||||||
|
--> tests/ui/tabs_in_doc_comments.rs:10:9
|
||||||
|
|
|
||||||
|
LL | /// - First String:
|
||||||
|
| ^^^^ help: consider using four spaces per tab
|
||||||
|
|
||||||
|
error: using tabs in doc comments is not recommended
|
||||||
|
--> tests/ui/tabs_in_doc_comments.rs:11:9
|
||||||
|
|
|
||||||
|
LL | /// - needs to be inside here
|
||||||
|
| ^^^^^^^^ help: consider using four spaces per tab
|
||||||
|
|
||||||
|
error: using tabs in doc comments is not recommended
|
||||||
|
--> tests/ui/tabs_in_doc_comments.rs:14:9
|
||||||
|
|
|
||||||
|
LL | /// - Second String:
|
||||||
|
| ^^^^ help: consider using four spaces per tab
|
||||||
|
|
||||||
|
error: using tabs in doc comments is not recommended
|
||||||
|
--> tests/ui/tabs_in_doc_comments.rs:15:9
|
||||||
|
|
|
||||||
|
LL | /// - needs to be inside here
|
||||||
|
| ^^^^^^^^ help: consider using four spaces per tab
|
||||||
|
|
||||||
error: aborting due to 8 previous errors
|
error: aborting due to 8 previous errors
|
||||||
|
|
||||||
|
|
|
@ -1,39 +1,11 @@
|
||||||
error: no need to put clippy lints behind a `clippy` cfg
|
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:13:1
|
|
||||||
|
|
|
||||||
LL | #[cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#[deny(clippy::non_minimal_cfg)]`
|
|
||||||
|
|
|
||||||
= note: `-D clippy::unnecessary-clippy-cfg` implied by `-D warnings`
|
|
||||||
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_clippy_cfg)]`
|
|
||||||
|
|
||||||
error: no need to put clippy lints behind a `clippy` cfg
|
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:15:36
|
|
||||||
|
|
|
||||||
LL | #[cfg_attr(clippy, deny(dead_code, clippy::non_minimal_cfg))]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: write instead: `#[deny(clippy::non_minimal_cfg)]`
|
|
||||||
|
|
||||||
error: no need to put clippy lints behind a `clippy` cfg
|
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:17:36
|
|
||||||
|
|
|
||||||
LL | #[cfg_attr(clippy, deny(dead_code, clippy::non_minimal_cfg))]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: write instead: `#[deny(clippy::non_minimal_cfg)]`
|
|
||||||
|
|
||||||
error: no need to put clippy lints behind a `clippy` cfg
|
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:19:1
|
|
||||||
|
|
|
||||||
LL | #[cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#[deny(clippy::non_minimal_cfg)]`
|
|
||||||
|
|
||||||
error: no need to put clippy lints behind a `clippy` cfg
|
error: no need to put clippy lints behind a `clippy` cfg
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:4:1
|
--> tests/ui/unnecessary_clippy_cfg.rs:4:1
|
||||||
|
|
|
|
||||||
LL | #![cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
LL | #![cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#![deny(clippy::non_minimal_cfg)]`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#![deny(clippy::non_minimal_cfg)]`
|
||||||
|
|
|
||||||
|
= note: `-D clippy::unnecessary-clippy-cfg` implied by `-D warnings`
|
||||||
|
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_clippy_cfg)]`
|
||||||
|
|
||||||
error: no need to put clippy lints behind a `clippy` cfg
|
error: no need to put clippy lints behind a `clippy` cfg
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:6:37
|
--> tests/ui/unnecessary_clippy_cfg.rs:6:37
|
||||||
|
@ -57,6 +29,34 @@ error: no need to put clippy lints behind a `clippy` cfg
|
||||||
LL | #![cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
LL | #![cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#![deny(clippy::non_minimal_cfg)]`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#![deny(clippy::non_minimal_cfg)]`
|
||||||
|
|
||||||
|
error: no need to put clippy lints behind a `clippy` cfg
|
||||||
|
--> tests/ui/unnecessary_clippy_cfg.rs:13:1
|
||||||
|
|
|
||||||
|
LL | #[cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#[deny(clippy::non_minimal_cfg)]`
|
||||||
|
|
||||||
|
error: no need to put clippy lints behind a `clippy` cfg
|
||||||
|
--> tests/ui/unnecessary_clippy_cfg.rs:15:36
|
||||||
|
|
|
||||||
|
LL | #[cfg_attr(clippy, deny(dead_code, clippy::non_minimal_cfg))]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: write instead: `#[deny(clippy::non_minimal_cfg)]`
|
||||||
|
|
||||||
|
error: no need to put clippy lints behind a `clippy` cfg
|
||||||
|
--> tests/ui/unnecessary_clippy_cfg.rs:17:36
|
||||||
|
|
|
||||||
|
LL | #[cfg_attr(clippy, deny(dead_code, clippy::non_minimal_cfg))]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: write instead: `#[deny(clippy::non_minimal_cfg)]`
|
||||||
|
|
||||||
|
error: no need to put clippy lints behind a `clippy` cfg
|
||||||
|
--> tests/ui/unnecessary_clippy_cfg.rs:19:1
|
||||||
|
|
|
||||||
|
LL | #[cfg_attr(clippy, deny(clippy::non_minimal_cfg))]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `#[deny(clippy::non_minimal_cfg)]`
|
||||||
|
|
||||||
error: duplicated attribute
|
error: duplicated attribute
|
||||||
--> tests/ui/unnecessary_clippy_cfg.rs:8:26
|
--> tests/ui/unnecessary_clippy_cfg.rs:8:26
|
||||||
|
|
|
|
||||||
|
|
Loading…
Reference in a new issue