Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/incorrect_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions src/tools/clippy/tests/ui/needless_raw_string.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -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"#;
}
7 changes: 4 additions & 3 deletions src/tools/clippy/tests/ui/needless_raw_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"#;
}
8 changes: 1 addition & 7 deletions src/tools/clippy/tests/ui/needless_raw_string.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

9 changes: 5 additions & 4 deletions src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -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" "# "## "######;
}
9 changes: 5 additions & 4 deletions src/tools/clippy/tests/ui/needless_raw_string_hashes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" "# "## "######;
}
20 changes: 1 addition & 19 deletions src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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