Skip to content

Commit f560152

Browse files
authored
Rollup merge of #96682 - nnethercote:show-invisible-delims, r=petrochenkov
Show invisible delimeters (within comments) when pretty printing. Because invisible syntax is really hard to work with! r? `@petrochenkov`
2 parents fa6f759 + cf82180 commit f560152

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

proc_macro/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,12 @@ pub enum Delimiter {
703703
/// `[ ... ]`
704704
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
705705
Bracket,
706-
/// `Ø ... Ø`
706+
/// `/*«*/ ... /*»*/`
707707
/// An invisible delimiter, that may, for example, appear around tokens coming from a
708708
/// "macro variable" `$var`. It is important to preserve operator priorities in cases like
709709
/// `$var * 3` where `$var` is `1 + 2`.
710-
/// Invisible delimiters might not survive roundtrip of a token stream through a string.
710+
/// Invisible delimiters are not directly writable in normal Rust code except as comments.
711+
/// Therefore, they might not survive a roundtrip of a token stream through a string.
711712
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
712713
None,
713714
}

0 commit comments

Comments
 (0)