diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:13:23 +0000 |
commit | 20431706a863f92cb37dc512fef6e48d192aaf2c (patch) | |
tree | 2867f13f5fd5437ba628c67d7f87309ccadcd286 /src/tools/clippy/tests/ui-cargo | |
parent | Releasing progress-linux version 1.65.0+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.tar.xz rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
9 files changed, 34 insertions, 5 deletions
diff --git a/src/tools/clippy/tests/ui-cargo/duplicate_mod/fail/src/main.stderr b/src/tools/clippy/tests/ui-cargo/duplicate_mod/fail/src/main.stderr index b450a2b18..3b80d89a6 100644 --- a/src/tools/clippy/tests/ui-cargo/duplicate_mod/fail/src/main.stderr +++ b/src/tools/clippy/tests/ui-cargo/duplicate_mod/fail/src/main.stderr @@ -7,8 +7,8 @@ LL | / #[path = "b.rs"] LL | | mod b2; | |_______^ loaded again here | - = note: `-D clippy::duplicate-mod` implied by `-D warnings` = help: replace all but one `mod` item with `use` items + = note: `-D clippy::duplicate-mod` implied by `-D warnings` error: file is loaded as a module multiple times: `$DIR/c.rs` --> $DIR/main.rs:9:1 diff --git a/src/tools/clippy/tests/ui-cargo/feature_name/fail/src/main.stderr b/src/tools/clippy/tests/ui-cargo/feature_name/fail/src/main.stderr index b9e6cb49b..c6a11fa93 100644 --- a/src/tools/clippy/tests/ui-cargo/feature_name/fail/src/main.stderr +++ b/src/tools/clippy/tests/ui-cargo/feature_name/fail/src/main.stderr @@ -1,7 +1,7 @@ error: the "no-" prefix in the feature name "no-qaq" is negative | - = note: `-D clippy::negative-feature-names` implied by `-D warnings` = help: consider renaming the feature to "qaq", but make sure the feature adds functionality + = note: `-D clippy::negative-feature-names` implied by `-D warnings` error: the "no_" prefix in the feature name "no_qaq" is negative | @@ -17,8 +17,8 @@ error: the "not_" prefix in the feature name "not_orz" is negative error: the "-support" suffix in the feature name "qvq-support" is redundant | - = note: `-D clippy::redundant-feature-names` implied by `-D warnings` = help: consider renaming the feature to "qvq" + = note: `-D clippy::redundant-feature-names` implied by `-D warnings` error: the "_support" suffix in the feature name "qvq_support" is redundant | diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/main.stderr b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/main.stderr index e2010e998..697c8b57c 100644 --- a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/main.stderr +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/main.stderr @@ -4,8 +4,8 @@ error: `mod.rs` files are required, found `bad/inner.rs` LL | pub mod stuff; | ^ | - = note: `-D clippy::self-named-module-files` implied by `-D warnings` = help: move `bad/inner.rs` to `bad/inner/mod.rs` + = note: `-D clippy::self-named-module-files` implied by `-D warnings` error: `mod.rs` files are required, found `bad/inner/stuff.rs` --> $DIR/bad/inner/stuff.rs:1:1 diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml new file mode 100644 index 000000000..a822fad38 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "fail-mod-remap" +version = "0.1.0" +edition = "2018" +publish = false + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs new file mode 100644 index 000000000..509aad186 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs @@ -0,0 +1 @@ +pub mod inner; diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs @@ -0,0 +1 @@ + diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs new file mode 100644 index 000000000..ba4c8c873 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs @@ -0,0 +1,7 @@ +// compile-flags: --remap-path-prefix {{src-base}}=/remapped + +#![warn(clippy::self_named_module_files)] + +mod bad; + +fn main() {} diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr new file mode 100644 index 000000000..ea6ea9806 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr @@ -0,0 +1,11 @@ +error: `mod.rs` files are required, found `bad.rs` + --> /remapped/module_style/fail_mod_remap/src/bad.rs:1:1 + | +LL | pub mod inner; + | ^ + | + = help: move `bad.rs` to `bad/mod.rs` + = note: `-D clippy::self-named-module-files` implied by `-D warnings` + +error: aborting due to previous error + diff --git a/src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/main.stderr b/src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/main.stderr index f91940209..f40ceea23 100644 --- a/src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/main.stderr +++ b/src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/main.stderr @@ -4,8 +4,8 @@ error: `mod.rs` files are not allowed, found `bad/mod.rs` LL | pub struct Thing; | ^ | - = note: `-D clippy::mod-module-files` implied by `-D warnings` = help: move `bad/mod.rs` to `bad.rs` + = note: `-D clippy::mod-module-files` implied by `-D warnings` error: aborting due to previous error |