rust/compiler/rustc_span/src
Esteban Küber 9dffe9573b Make unicode text flow control chars visible as �
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}');
   |                       ~~~~~~~~
```
2024-07-18 20:08:43 +00:00
..
analyze_source_file Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
edit_distance Add test for precise algorithm used 2023-02-19 22:59:22 +00:00
source_map Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
symbol Use FxIndexSet in the symbol interner. 2023-11-03 07:19:41 +11:00
analyze_source_file.rs Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
caching_source_map_view.rs Add better ICE messages for some undescriptive panics 2023-12-15 00:50:55 -05:00
def_id.rs Ensure careful consideration is given by impls 2024-06-22 07:17:02 +01:00
edit_distance.rs check rust lints when an unknown lint is detected 2024-01-12 18:50:36 +08:00
edition.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
fatal_error.rs Auto merge of #117557 - Zoxc:panic-prio, r=petrochenkov 2023-11-09 00:39:02 +00:00
hygiene.rs Auto merge of #123165 - oli-obk:no_ord_def_id3, r=cjgillot 2024-06-21 13:47:43 +00:00
lib.rs Make unicode text flow control chars visible as � 2024-07-18 20:08:43 +00:00
profiling.rs Remove an unnecessary use of with_session_globals. 2023-03-31 15:34:00 +11:00
source_map.rs Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
span_encoding.rs rustc_span: Optimize span parent get/set methods 2024-06-20 17:02:13 +03:00
symbol.rs Added the xop target feature and xop_target_feature gate 2024-07-12 23:30:22 +05:30
tests.rs Add Span::trim_end 2024-06-04 13:11:45 +10:00