You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We already point these out quite aggressively, telling people not to use them, but would normally be rendered as nothing. Having them visible will make it easier for people to actually deal with them.
```
error: unicode codepoint changing visible direction of text present in literal
--> $DIR/unicode-control-codepoints.rs:26:22
|
LL | println!("{:?}", '�');
| ^-^
| ||
| |'\u{202e}'
| this literal contains an invisible unicode text flow control codepoint
|
= note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
= help: if their presence wasn't intentional, you can remove them
help: if you want to keep them but make them visible in your source code, you can escape them
|
LL | println!("{:?}", '\u{202e}');
| ~~~~~~~~
```
vs the previous
```
error: unicode codepoint changing visible direction of text present in literal
--> $DIR/unicode-control-codepoints.rs:26:22
|
LL | println!("{:?}", '');
| ^-
| ||
| |'\u{202e}'
| this literal contains an invisible unicode text flow control codepoint
|
= note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
= help: if their presence wasn't intentional, you can remove them
help: if you want to keep them but make them visible in your source code, you can escape them
|
LL | println!("{:?}", '\u{202e}');
| ~~~~~~~~
```
error: unicode codepoint changing visible direction of text present in doc comment
170
170
--> $DIR/unicode-control-codepoints.rs:33:1
171
171
|
172
-
LL | /** ''); */fn foo() {}
173
-
| ^^^^^^^^^^^^ this doc comment contains an invisible unicode text flow control codepoint
172
+
LL | /** '�'); */fn foo() {}
173
+
| ^^^^^^^^^^^^^ this doc comment contains an invisible unicode text flow control codepoint
174
174
|
175
175
= note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
176
176
= note: if their presence wasn't intentional, you can remove them
@@ -181,8 +181,8 @@ error: unicode codepoint changing visible direction of text present in doc comme
181
181
|
182
182
LL | / /**
183
183
LL | | *
184
-
LL | | * ''); */fn bar() {}
185
-
| |___________^ this doc comment contains an invisible unicode text flow control codepoint
184
+
LL | | * '�'); */fn bar() {}
185
+
| |____________^ this doc comment contains an invisible unicode text flow control codepoint
186
186
|
187
187
= note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
188
188
= note: if their presence wasn't intentional, you can remove them
0 commit comments