Skip to content

Commit eee6b31

Browse files
committed
Auto merge of rust-lang#113455 - Alexendoo:clippy-tests, r=Nilstrieb
Fix failing clippy tests Comments out the C string literals due to rust-lang#113334 Fixes rust-lang/rust-clippy#11121 Opened against `rust-lang/rust` in order to unblock rust-lang#113450 r? `@Nilstrieb`
2 parents cb80ff1 + cedcd39 commit eee6b31

7 files changed

+21
-41
lines changed

src/tools/clippy/clippy_lints/src/incorrect_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl LateLintPass<'_> for IncorrectImpls {
8282
cx,
8383
hir_ty_to_ty(cx.tcx, imp.self_ty),
8484
copy_def_id,
85-
trait_impl.substs,
85+
&[],
8686
)
8787
{
8888
if impl_item.ident.name == sym::clone {

src/tools/clippy/tests/ui/needless_raw_string.fixed

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ fn main() {
1010
b"aaa";
1111
br#""aaa""#;
1212
br#"\s"#;
13-
c"aaa";
14-
cr#""aaa""#;
15-
cr#"\s"#;
13+
// currently disabled: https://github.com/rust-lang/rust/issues/113333
14+
// cr#"aaa"#;
15+
// cr#""aaa""#;
16+
// cr#"\s"#;
1617
}

src/tools/clippy/tests/ui/needless_raw_string.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ fn main() {
1010
br#"aaa"#;
1111
br#""aaa""#;
1212
br#"\s"#;
13-
cr#"aaa"#;
14-
cr#""aaa""#;
15-
cr#"\s"#;
13+
// currently disabled: https://github.com/rust-lang/rust/issues/113333
14+
// cr#"aaa"#;
15+
// cr#""aaa""#;
16+
// cr#"\s"#;
1617
}

src/tools/clippy/tests/ui/needless_raw_string.stderr

+1-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,5 @@ error: unnecessary raw string literal
1212
LL | br#"aaa"#;
1313
| ^^^^^^^^^ help: try: `b"aaa"`
1414

15-
error: unnecessary raw string literal
16-
--> $DIR/needless_raw_string.rs:13:5
17-
|
18-
LL | cr#"aaa"#;
19-
| ^^^^^^^^^ help: try: `c"aaa"`
20-
21-
error: aborting due to 3 previous errors
15+
error: aborting due to 2 previous errors
2216

src/tools/clippy/tests/ui/needless_raw_string_hashes.fixed

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ fn main() {
1212
br#"Hello "world"!"#;
1313
br####" "### "## "# "####;
1414
br###" "aa" "# "## "###;
15-
cr#"aaa"#;
16-
cr#"Hello "world"!"#;
17-
cr####" "### "## "# "####;
18-
cr###" "aa" "# "## "###;
15+
// currently disabled: https://github.com/rust-lang/rust/issues/113333
16+
// cr#"aaa"#;
17+
// cr##"Hello "world"!"##;
18+
// cr######" "### "## "# "######;
19+
// cr######" "aa" "# "## "######;
1920
}

src/tools/clippy/tests/ui/needless_raw_string_hashes.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ fn main() {
1212
br##"Hello "world"!"##;
1313
br######" "### "## "# "######;
1414
br######" "aa" "# "## "######;
15-
cr#"aaa"#;
16-
cr##"Hello "world"!"##;
17-
cr######" "### "## "# "######;
18-
cr######" "aa" "# "## "######;
15+
// currently disabled: https://github.com/rust-lang/rust/issues/113333
16+
// cr#"aaa"#;
17+
// cr##"Hello "world"!"##;
18+
// cr######" "### "## "# "######;
19+
// cr######" "aa" "# "## "######;
1920
}

src/tools/clippy/tests/ui/needless_raw_string_hashes.stderr

+1-19
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,5 @@ error: unnecessary hashes around raw string literal
3636
LL | br######" "aa" "# "## "######;
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `br###" "aa" "# "## "###`
3838

39-
error: unnecessary hashes around raw string literal
40-
--> $DIR/needless_raw_string_hashes.rs:16:5
41-
|
42-
LL | cr##"Hello "world"!"##;
43-
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr#"Hello "world"!"#`
44-
45-
error: unnecessary hashes around raw string literal
46-
--> $DIR/needless_raw_string_hashes.rs:17:5
47-
|
48-
LL | cr######" "### "## "# "######;
49-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr####" "### "## "# "####`
50-
51-
error: unnecessary hashes around raw string literal
52-
--> $DIR/needless_raw_string_hashes.rs:18:5
53-
|
54-
LL | cr######" "aa" "# "## "######;
55-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cr###" "aa" "# "## "###`
56-
57-
error: aborting due to 9 previous errors
39+
error: aborting due to 6 previous errors
5840

0 commit comments

Comments
 (0)