@@ -6,7 +6,7 @@ LL | let _bad1 = "/033[0m";
6
6
|
7
7
= note: `-D clippy::octal-escapes` implied by `-D warnings`
8
8
= help: octal escapes are not supported, `/0` is always a null character
9
- help: if an octal escape is intended, use
9
+ help: if an octal escape was intended, use the hexadecimal representation instead
10
10
|
11
11
LL | let _bad1 = "/x1b[0m";
12
12
| ~~~~~~~~~
@@ -22,14 +22,14 @@ LL | let _bad2 = b"/033[0m";
22
22
| ^^^^^^^^^^
23
23
|
24
24
= help: octal escapes are not supported, `/0` is always a null byte
25
- help: if an octal escape is intended, use
25
+ help: if an octal escape was intended, use the hexadecimal representation instead
26
26
|
27
- LL | let _bad2 = "/x1b[0m";
28
- | ~~~~~~~~~
27
+ LL | let _bad2 = b "/x1b[0m";
28
+ | ~~~~~~~~~~
29
29
help: if the null byte is intended, disambiguate using
30
30
|
31
- LL | let _bad2 = "/x0033[0m";
32
- | ~~~~~~~~~~~
31
+ LL | let _bad2 = b "/x0033[0m";
32
+ | ~~~~~~~~~~~~
33
33
34
34
error: octal-looking escape in string literal
35
35
--> $DIR/octal_escapes.rs:6:17
@@ -38,7 +38,7 @@ LL | let _bad3 = "//033[0m";
38
38
| ^^^^^^^^^^^
39
39
|
40
40
= help: octal escapes are not supported, `/0` is always a null character
41
- help: if an octal escape is intended, use
41
+ help: if an octal escape was intended, use the hexadecimal representation instead
42
42
|
43
43
LL | let _bad3 = "//x1b[0m";
44
44
| ~~~~~~~~~~~
@@ -48,20 +48,116 @@ LL | let _bad3 = "//x0033[0m";
48
48
| ~~~~~~~~~~~~~
49
49
50
50
error: octal-looking escape in string literal
51
- --> $DIR/octal_escapes.rs:7 :17
51
+ --> $DIR/octal_escapes.rs:8 :17
52
52
|
53
53
LL | let _bad4 = "/01234567";
54
54
| ^^^^^^^^^^^
55
55
|
56
56
= help: octal escapes are not supported, `/0` is always a null character
57
- help: if an octal escape is intended, use
57
+ help: if an octal escape was intended, use the hexadecimal representation instead
58
58
|
59
- LL | let _bad4 = "/u{53977} ";
59
+ LL | let _bad4 = "/x0a34567 ";
60
60
| ~~~~~~~~~~~
61
61
help: if the null character is intended, disambiguate using
62
62
|
63
63
LL | let _bad4 = "/x001234567";
64
64
| ~~~~~~~~~~~~~
65
65
66
- error: aborting due to 4 previous errors
66
+ error: octal-looking escape in string literal
67
+ --> $DIR/octal_escapes.rs:10:17
68
+ |
69
+ LL | let _bad6 = "Text-/055/077-MoreText";
70
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
71
+ |
72
+ = help: octal escapes are not supported, `/0` is always a null character
73
+ help: if an octal escape was intended, use the hexadecimal representation instead
74
+ |
75
+ LL | let _bad6 = "Text-/x2d/077-MoreText";
76
+ | ~~~~~~~~~~~~~~~~~~~~~~~~
77
+ help: if the null character is intended, disambiguate using
78
+ |
79
+ LL | let _bad6 = "Text-/x0055/077-MoreText";
80
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~
81
+
82
+ error: octal-looking escape in string literal
83
+ --> $DIR/octal_escapes.rs:10:17
84
+ |
85
+ LL | let _bad6 = "Text-/055/077-MoreText";
86
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
87
+ |
88
+ = help: octal escapes are not supported, `/0` is always a null character
89
+ help: if an octal escape was intended, use the hexadecimal representation instead
90
+ |
91
+ LL | let _bad6 = "Text-/055/x3f-MoreText";
92
+ | ~~~~~~~~~~~~~~~~~~~~~~~~
93
+ help: if the null character is intended, disambiguate using
94
+ |
95
+ LL | let _bad6 = "Text-/055/x0077-MoreText";
96
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~
97
+
98
+ error: octal-looking escape in string literal
99
+ --> $DIR/octal_escapes.rs:11:17
100
+ |
101
+ LL | let _bad7 = "EvenMoreText-/01/02-ShortEscapes";
102
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
+ |
104
+ = help: octal escapes are not supported, `/0` is always a null character
105
+ help: if an octal escape was intended, use the hexadecimal representation instead
106
+ |
107
+ LL | let _bad7 = "EvenMoreText-/x01/02-ShortEscapes";
108
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109
+ help: if the null character is intended, disambiguate using
110
+ |
111
+ LL | let _bad7 = "EvenMoreText-/x001/02-ShortEscapes";
112
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113
+
114
+ error: octal-looking escape in string literal
115
+ --> $DIR/octal_escapes.rs:11:17
116
+ |
117
+ LL | let _bad7 = "EvenMoreText-/01/02-ShortEscapes";
118
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119
+ |
120
+ = help: octal escapes are not supported, `/0` is always a null character
121
+ help: if an octal escape was intended, use the hexadecimal representation instead
122
+ |
123
+ LL | let _bad7 = "EvenMoreText-/01/x02-ShortEscapes";
124
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125
+ help: if the null character is intended, disambiguate using
126
+ |
127
+ LL | let _bad7 = "EvenMoreText-/01/x002-ShortEscapes";
128
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129
+
130
+ error: octal-looking escape in string literal
131
+ --> $DIR/octal_escapes.rs:12:17
132
+ |
133
+ LL | let _bad8 = "锈/01锈";
134
+ | ^^^^^^^^^
135
+ |
136
+ = help: octal escapes are not supported, `/0` is always a null character
137
+ help: if an octal escape was intended, use the hexadecimal representation instead
138
+ |
139
+ LL | let _bad8 = "锈/x01锈";
140
+ | ~~~~~~~~~~
141
+ help: if the null character is intended, disambiguate using
142
+ |
143
+ LL | let _bad8 = "锈/x001锈";
144
+ | ~~~~~~~~~~~
145
+
146
+ error: octal-looking escape in string literal
147
+ --> $DIR/octal_escapes.rs:13:17
148
+ |
149
+ LL | let _bad9 = "锈/011锈";
150
+ | ^^^^^^^^^^
151
+ |
152
+ = help: octal escapes are not supported, `/0` is always a null character
153
+ help: if an octal escape was intended, use the hexadecimal representation instead
154
+ |
155
+ LL | let _bad9 = "锈/x09锈";
156
+ | ~~~~~~~~~~
157
+ help: if the null character is intended, disambiguate using
158
+ |
159
+ LL | let _bad9 = "锈/x0011锈";
160
+ | ~~~~~~~~~~~~
161
+
162
+ error: aborting due to 10 previous errors
67
163
0 commit comments