mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
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:
parent
8c70e522ad
commit
87373d7f52
7 changed files with 21 additions and 41 deletions
|
@ -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 {
|
||||
|
|
|
@ -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"#;
|
||||
}
|
||||
|
|
|
@ -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"#;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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" "# "## "######;
|
||||
}
|
||||
|
|
|
@ -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" "# "## "######;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue