Comments (1)
Thanks for the report! This is due to the hygiene in the compiler, so you'll either need to work around that (like in https://github.com/dtolnay/syn/blob/master/examples/heapsize2/heapsize_derive/src/lib.rs) or you'll need to use quote_spanned!
with the Span::call_site()
span
from proc-macro2.
Related Issues (20)
- Convert from proc_macro2::Span to proc_macro::Span without panic
- Breaking change in 1.0.52 HOT 2
- Unable to construct DelimSpan HOT 2
- Fallback spans stack when parsing more than once HOT 4
- panic: "compiler/fallback mismatch" when using proc_macro2::fallback::force() escape hatch HOT 2
- Re-enable honggfuzz CI
- error[E0635]: unknown feature `proc_macro_span_shrink` HOT 2
- unknown feature `proc_macro_span_shrink` HOT 2
- span.start() and span.end() is not working in proc_macro context even in nightly version. HOT 5
- Consider propagating rustc's compile_error representation as a token
- `Span::source_text` panics with multibyte source HOT 1
- Issue with multibyte chars in source_text() computation HOT 1
- Consider recalibrating how bits are divided in Span HOT 3
- Consider an API to reset thread-local Span data HOT 2
- Make `proc_macro_span` optional with nightly HOT 4
- Enhance documentation with examples.
- panic in fallback.rs:817 HOT 3
- Build script fails when compiling with target-feature=+avx512bw HOT 2
- Linking failed after updating to 1.0.76 HOT 2
- Provide an API to access byte offsets for Spans
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 proc-macro2.