about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Macleod <alex@macleod.io>2023-07-07 18:18:25 +0000
committerAlex Macleod <alex@macleod.io>2023-07-07 18:19:08 +0000
commitcedcd39cfd31946112f0a1f5c77ec58451893f6d (patch)
tree83c6a3e7de2fa978df48baf2708daff6fd7258f8
parentfd68a6ded951bd7b852ab8107007f7145e3ad6ec (diff)
downloadrust-cedcd39cfd31946112f0a1f5c77ec58451893f6d.tar.gz
rust-cedcd39cfd31946112f0a1f5c77ec58451893f6d.zip
Fix failing clippy tests
Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334

Fixes https://github.com/rust-lang/rust-clippy/issues/11121
-rw-r--r--src/tools/clippy/clippy_lints/src/incorrect_impls.rs2
-rw-r--r--src/tools/clippy/tests/ui/needless_raw_string.fixed7
-rw-r--r--src/tools/clippy/tests/ui/needless_raw_string.rs7
-rw-r--r--src/tools/clippy/tests/ui/needless_raw_string.stderr8
-rw-r--r--src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed9
-rw-r--r--src/tools/clippy/tests/ui/needless_raw_string_hashes.rs9
-rw-r--r--src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr20
7 files changed, 21 insertions, 41 deletions
diff --git a/src/tools/clippy/clippy_lints/src/incorrect_impls.rs b/src/tools/clippy/clippy_lints/src/incorrect_impls.rs
index 13cc0b23ba3..7b95116ee4e 100644
--- a/src/tools/clippy/clippy_lints/src/incorrect_impls.rs
+++ b/src/tools/clippy/clippy_lints/src/incorrect_impls.rs
@@ -82,7 +82,7 @@ impl LateLintPass<'_> for IncorrectImpls {
                     cx,
                     hir_ty_to_ty(cx.tcx, imp.self_ty),
                     copy_def_id,
-                    trait_impl.substs,
+                    &[],
                 )
         {
             if impl_item.ident.name == sym::clone {
diff --git a/src/tools/clippy/tests/ui/needless_raw_string.fixed b/src/tools/clippy/tests/ui/needless_raw_string.fixed
index 6438e46977b..b36912efbb2 100644
--- a/src/tools/clippy/tests/ui/needless_raw_string.fixed
+++ b/src/tools/clippy/tests/ui/needless_raw_string.fixed
@@ -10,7 +10,8 @@ fn main() {
     b"aaa";
     br#""aaa""#;
     br#"\s"#;
-    c"aaa";
-    cr#""aaa""#;
-    cr#"\s"#;
+    // currently disabled: https://github.com/rust-lang/rust/issues/113333
+    // cr#"aaa"#;
+    // cr#""aaa""#;
+    // cr#"\s"#;
 }
diff --git a/src/tools/clippy/tests/ui/needless_raw_string.rs b/src/tools/clippy/tests/ui/needless_raw_string.rs
index f7ddc68265e..8f48e7dab2a 100644
--- a/src/tools/clippy/tests/ui/needless_raw_string.rs
+++ b/src/tools/clippy/tests/ui/needless_raw_string.rs
@@ -10,7 +10,8 @@ fn main() {
     br#"aaa"#;
     br#""aaa""#;
     br#"\s"#;
-    cr#"aaa"#;
-    cr#""aaa""#;
-    cr#"\s"#;
+    // currently disabled: https://github.com/rust-lang/rust/issues/113333
+    // cr#"aaa"#;
+    // cr#""aaa""#;
+    // cr#"\s"#;
 }
diff --git a/src/tools/clippy/tests/ui/needless_raw_string.stderr b/src/tools/clippy/tests/ui/needless_raw_string.stderr
index 0179978b7b0..cfb07b647d7 100644
--- a/src/tools/clippy/tests/ui/needless_raw_string.stderr
+++ b/src/tools/clippy/tests/ui/needless_raw_string.stderr
@@ -12,11 +12,5 @@ error: unnecessary raw string literal
 LL |     br#"aaa"#;
    |     ^^^^^^^^^ help: try: `b"aaa"`
 
-error: unnecessary raw string literal
-  --> $DIR/needless_raw_string.rs:13:5
-   |
-LL |     cr#"aaa"#;
-   |     ^^^^^^^^^ help: try: `c"aaa"`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed b/src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed
index e4d7d8fb017..c8507c72715 100644
--- a/src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed
+++ b/src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed
@@ -12,8 +12,9 @@ fn main() {
     br#"Hello "world"!"#;
     br####" "### "## "# "####;
     br###" "aa" "# "## "###;
-    cr#"aaa"#;
-    cr#"Hello "world"!"#;
-    cr####" "### "## "# "####;
-    cr###" "aa" "# "## "###;
+    // currently disabled: https://github.com/rust-lang/rust/issues/113333
+    // cr#"aaa"#;
+    // cr##"Hello "world"!"##;
+    // cr######" "### "## "# "######;
+    // cr######" "aa" "# "## "######;
 }
diff --git a/src/tools/clippy/tests/ui/needless_raw_string_hashes.rs b/src/tools/clippy/tests/ui/needless_raw_string_hashes.rs
index e2d85c52e78..912fbde1679 100644
--- a/src/tools/clippy/tests/ui/needless_raw_string_hashes.rs
+++ b/src/tools/clippy/tests/ui/needless_raw_string_hashes.rs
@@ -12,8 +12,9 @@ fn main() {
     br##"Hello "world"!"##;
     br######" "### "## "# "######;
     br######" "aa" "# "## "######;
-    cr#"aaa"#;
-    cr##"Hello "world"!"##;
-    cr######" "### "## "# "######;
-    cr######" "aa" "# "## "######;
+    // currently disabled: https://github.com/rust-lang/rust/issues/113333
+    // cr#"aaa"#;
+    // cr##"Hello "world"!"##;
+    // cr######" "### "## "# "######;
+    // cr######" "aa" "# "## "######;
 }
diff --git a/src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr b/src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr
index dff47a2d042..30e6783a38e 100644
--- a/src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr
+++ b/src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr
@@ -36,23 +36,5 @@ error: unnecessary hashes around raw string literal
 LL |     br######" "aa" "# "## "######;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `br###" "aa" "# "## "###`
 
-error: unnecessary hashes around raw string literal
-  --> $DIR/needless_raw_string_hashes.rs:16:5
-   |
-LL |     cr##"Hello "world"!"##;
-   |     ^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr#"Hello "world"!"#`
-
-error: unnecessary hashes around raw string literal
-  --> $DIR/needless_raw_string_hashes.rs:17:5
-   |
-LL |     cr######" "### "## "# "######;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr####" "### "## "# "####`
-
-error: unnecessary hashes around raw string literal
-  --> $DIR/needless_raw_string_hashes.rs:18:5
-   |
-LL |     cr######" "aa" "# "## "######;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr###" "aa" "# "## "###`
-
-error: aborting due to 9 previous errors
+error: aborting due to 6 previous errors