@@ -6,7 +6,7 @@ LL | let _bad1 = "/033[0m";
66 |
77 = note: `-D clippy::octal-escapes` implied by `-D warnings`
88 = 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
1010 |
1111LL | let _bad1 = "/x1b[0m";
1212 | ~~~~~~~~~
@@ -22,14 +22,14 @@ LL | let _bad2 = b"/033[0m";
2222 | ^^^^^^^^^^
2323 |
2424 = 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
2626 |
27- LL | let _bad2 = "/x1b[0m";
28- | ~~~~~~~~~
27+ LL | let _bad2 = b "/x1b[0m";
28+ | ~~~~~~~~~~
2929help: if the null byte is intended, disambiguate using
3030 |
31- LL | let _bad2 = "/x0033[0m";
32- | ~~~~~~~~~~~
31+ LL | let _bad2 = b "/x0033[0m";
32+ | ~~~~~~~~~~~~
3333
3434error: octal-looking escape in string literal
3535 --> $DIR/octal_escapes.rs:6:17
@@ -38,7 +38,7 @@ LL | let _bad3 = "//033[0m";
3838 | ^^^^^^^^^^^
3939 |
4040 = 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
4242 |
4343LL | let _bad3 = "//x1b[0m";
4444 | ~~~~~~~~~~~
@@ -48,20 +48,116 @@ LL | let _bad3 = "//x0033[0m";
4848 | ~~~~~~~~~~~~~
4949
5050error: octal-looking escape in string literal
51- --> $DIR/octal_escapes.rs:7 :17
51+ --> $DIR/octal_escapes.rs:8 :17
5252 |
5353LL | let _bad4 = "/01234567";
5454 | ^^^^^^^^^^^
5555 |
5656 = 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
5858 |
59- LL | let _bad4 = "/u{53977} ";
59+ LL | let _bad4 = "/x0a34567 ";
6060 | ~~~~~~~~~~~
6161help: if the null character is intended, disambiguate using
6262 |
6363LL | let _bad4 = "/x001234567";
6464 | ~~~~~~~~~~~~~
6565
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
67163
0 commit comments