Comments (3)
This is a consequence of - NUM
being supported by literal
.
literal
may contain multiple tokens, so it's wrapped into a delimited group to preserve parsing priorities, similarly to expr
, ty
and others.
Only tt
and ident
always represent single tokens and therefore not wrapped.
Some PR with backround discussion - #92472.
Relevant part of the reference - https://doc.rust-lang.org/reference/procedural-macros.html#declarative-macro-tokens-and-procedural-macro-tokens.
Note that the reference deliberately says
Such token streams may be wrapped into delimited groups (Group) with implicit delimiters (Delimiter::None) when it's necessary for preserving parsing priorities.
to accommodate for potential future changes (e.g. omitting grouping for single-token streams).
Whether it can be done backward compatibly in practice is a separate question.
from rust.
@rustbot label +A-macros +WG-macros +A-maybe-future-edition +T-lang -needs-triage +A-macros-2.0
from rust.
@rustbot label +A-macros-2.0
from rust.
Related Issues (20)
- #[rustc_pass_by_value] prevents lldb from showing the information correctly HOT 6
- bootstrap rustc shim: FATAL: RUSTC_STAGE was not set HOT 1
- Lifetime inference fails for closures returning references to their parameters HOT 2
- vtable symbols are not marked artificial in DWARF HOT 2
- ICE: rustdoc: Cannot turn `UnevaluatedConst` into `AliasTy` HOT 1
- An unexpected expanded result from procedural macro
- suggestion to use generic parameter in case of "error[E0782]: trait objects must include the `dyn` keyword" HOT 2
- The extra newline in unpretty=hir
- Unclear lifetime mismatch error with anonymous lifetimes HOT 1
- DWARF information encodes discriminant values for tagged enums incorrectly
- BufWriter is happy with non-mutable Writer HOT 4
- [ICE]: opaque type with non-universal region args HOT 1
- ICE: `elem.index() < self.domain_size` HOT 1
- ICE: `cargo check` panics on toolchain `stable-x86_64-unknown-linux-gnu` HOT 6
- rustc can not be launched on Windows 7 x64 HOT 4
- `rustc_macros`: Make it possible to derive both `Diagnostic` and `LintDiagnostic` on the same type HOT 4
- Tracking Issue for PanicHookInfo::payload_as_str()
- rustdoc-json-types: Rename and document Impl::synthetic HOT 3
- ICE: ` unhandled type: {type error}`
- Confusing suggestion for `dropping_copy_types` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.