-
Notifications
You must be signed in to change notification settings - Fork 114
Description
In Rust 2024, we'll be reserving -- at tokenization time -- the hash characters ##
(and all longer joined sequences of hash characters). You can learn more about this change here:
- Tracking Issue for RFC 3593: Reserve unprefixed guarded string literals in Edition 2024 rust-lang/rust#123735
- https://doc.rust-lang.org/nightly/edition-guide/rust-2024/reserved-syntax.html
In this commit 1f3418c of the peg
crate, you added "##method()
syntax to call a method on the input object".
Users who migrate to Rust 2024 will not be able to use this syntax.
Generally, our recommendation to callers of macros that expect ##
would be to add a space. However, that doesn't work in the case of the peg
crate, as the implementation checks specifically for jointness.
We notice that though this feature was added many years ago and that it doesn't seem to be documented or, as best as we can tell, widely used.
We're curious what the story is on this feature. In particular we want to check that there's not some critical use case for this that we've missed. And we're curious about how or whether you'll migrate this feature. Given that it was seemingly never documented, we wonder whether you even meant for this to be part of the surface area of your crate.
Thanks.
See:
- 2024 reserved ## breaks some proc-macros rust-lang/rust#133887
- change guarded string reserved tokens to
#"
,##"
,###
rust-lang/rust#133924
cc @kevinmehall