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
This commit is contained in:
Alex Macleod 2023-07-07 18:18:25 +00:00
parent 8c70e522ad
commit 87373d7f52
7 changed files with 21 additions and 41 deletions

View file

@ -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 {

View file

@ -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"#;
}

View file

@ -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"#;
}

View file

@ -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

View file

@ -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" "# "## "######;
}

View file

@ -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" "# "## "######;
}

View file

@ -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