Comments (6)
It looks like you are using an old nightly compiler. In general, old nightly compilers are not supported. The expectation is that if you are using a nightly toolchain, then you are remaining on top of recent nightly changes.
If you need to pin to an old nightly toolchain, then you would need to use corresponding old crate versions, too (such as via a lockfile).
from proc-macro2.
@dtolnay Just to provide some context, the reason we pin older nightlies for Rust on AVR is that there are compiler regressions in the AVR backend from time to time. This has two implications:
- When a regression is present, there simply is no way to use latest nightly.
- When no known regressions are present, we still want to advertise a known-to-work compiler version so unsuspecting users aren't the first ones to run into new problems.
Such is the life of a tier 3 target...
In general, old nightly compilers are not supported. The expectation is that if you are using a nightly toolchain, then you are remaining on top of recent nightly changes.
This is a bit unfortunate, as for the stated reason, we A) cannot always upgrade nightly and B) this makes regression-hunting quite difficult if certain crates break with not-that-old compiler versions.
then you would need to use corresponding old crate versions, too (such as via a lockfile).
This is a good pointer though, I guess we can try doing that for crates that are AVR-specific. This of course won't work as soon as any non-platform-specific crate in the dependency tree pulls in later versions...
from proc-macro2.
Actually, thinking about it, the version in rust-toolchain.toml is probably infered from current latest installed nightly
@mikkelens No, it is not. It is hard-coded here and we update it when we have a new known-to-work compiler version.
from proc-macro2.
This being missing makes me unable to use arduino-hal
templates with cargo generate
because their dependencies use this crate through quote
, and using stable is not an option for this. I'm trying to figure out how to force transitive dependencies to use 1.0.35
of quote
or 1.0.79
of proc-macro2
, but simply specifying it for cargo with a cargo update -p proc-macro2 --precise 1.0.79
does not do it.
from proc-macro2.
The avr-hal
templates for arduino, aka. arduino-hal
templates, use a rust-toolchain.toml
file to specify specific versions of nightly similar to what you describe, but like you imply, they use an older version of nightly (in my case: 2024-03-22).
Anyways, I was able to solve the issue by adding this to my my Cargo.toml
, which ends up modifying my "lockfile" (assuming you are refering to Cargo.lock
):
[patch.crates-io]
proc-macro2 = { git = "https://github.com/dtolnay/proc-macro2", rev = "4ba4ab1ec52d9e8286826a898430683ba002a002" }
from proc-macro2.
Actually, thinking about it, the version in rust-toolchain.toml
is probably infered from current latest installed nightly, and I updated nightly only after generating the template today. Sorry for the confusion.
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
- 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
- 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
- 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.