Comments (2)
Adding such an API would be much appreciated. My workload is similar to what you described in your comment. David, did you already have an API in mind? I'd be happy to file a PR.
Also for my understanding: The idea behind the thread-local source map is to avoid a ref on Span to safe bytes?
from proc-macro2.
Something like proc_macro2::invalidate_current_thread_spans()
with a realistic code example.
The idea behind the thread-local source map is to avoid a ref on Span to safe bytes?
Span
needs to be Copy and 'static. I don't know any other way to implement that, regardless of how many bytes big Span is.
from proc-macro2.
Related Issues (20)
- `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
- 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
- Not compatible with 1.66-nightly HOT 2
- cannot find struct, variant or union type `LineColumn` in crate `proc_macro` HOT 1
- arm64-linux build error HOT 1
- bug?: Build script fails without `strip = "symbols"` HOT 1
- Missed nightly feature `proc_macro_byte_character` HOT 6
- Unsure if 100% the reason: Cargo Build issue for Arduino Uno (MCU= ATmega238p) HOT 3
- Help with debugging build command error HOT 1
- Looking for forks that make `proc_macro::Span` Send + Sync HOT 2
- Tokenize text with unbalanced delimiters HOT 2
- newly added test_size::test_proc_macro2_wrapper_size_without_locations test fails on i686 HOT 2
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.