Skip to content

Commit b127237

Browse files
authored
Rollup merge of #96433 - petrochenkov:delim, r=nnethercote
rustc_ast: Harmonize delimiter naming with `proc_macro::Delimiter` Compiler cannot reuse `proc_macro::Delimiter` directly due to extra impls, but can at least use the same naming. After this PR the only difference between these two enums is that `proc_macro::Delimiter::None` is turned into `token::Delimiter::Invisible`. It's my mistake that the invisible delimiter is called `None` on stable, during the stabilization I audited the naming and wrote the docs, but missed the fact that the `None` naming gives a wrong and confusing impression about what this thing is. cc rust-lang/rust#96421 r? ``@nnethercote``
2 parents 862bcf4 + 7d05bb1 commit b127237

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: proc_macro/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,10 @@ pub enum Delimiter {
704704
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
705705
Bracket,
706706
/// `Ø ... Ø`
707-
/// An implicit delimiter, that may, for example, appear around tokens coming from a
707+
/// 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-
/// Implicit delimiters might not survive roundtrip of a token stream through a string.
710+
/// Invisible delimiters might not survive roundtrip of a token stream through a string.
711711
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
712712
None,
713713
}

0 commit comments

Comments
 (0)