-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Build failing after update to Rust 1.47.0 #77789
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I tried to dig into the issue as well. As a first thing, I modified Take the following code extracted from the tests of #[cfg(feature = "implicit_map")]
#[test]
fn unwrap_option() {
assert_eq!(try_match!(Some(a) = Some(42)), Ok(42));
} The
The tokenstream in 1.47.0:
If you diff the two tokenstreams, you will discover that in 1.46.0 the identifier Unfortunately, I think that the issue could involve many other projects that use proc macros. |
This is probably due to #73084, which AIUI is considered a necessary bug fix even though some code is no longer accepted. |
Possible duplicate of #76480 |
Interesting, that means I likely ran into this before myself on another project. |
We did a Crater run in #73084 to try to detect this kind of breakage ahead of time. Unfortunately, it looks like |
@Aaron1011 Yeah, I can definitely see why they need to be preserved. I'm pretty sure that the only (edit: potential, it turns out) user of |
@Aaron1011 there is something I don't get however: Surely running all the tests for all crates.io is takes a tremendous amount of resources, maybe compiling the tests without running them could be a good compromise? In this case it would have helped detecting the issue. |
@dodomorandi I've opened rust-lang/crater#549 to track checking tests on Crater. |
The problem has been fixed in |
This (of course) works on my end too now: https://travis-ci.com/github/Tamschi/taml/builds/189299403 I hope it's alright if I close this issue here, since the build in question would now complete if I restarted it. |
I have a build that works fine on Rust 1.46.0 but fails on 1.47.0.
(I didn't have this issue on any 1.46 version, but I only run CI for 1.46.0.)
To reproduce, you can run:
git clone https://github.com/Tamschi/taml.git -b misc/rustc-bug-report cd taml cargo build
(Apologies for the large sample code. I failed to narrow this down on my own.)
On 1.46.0, this and
cargo test
complete successfully.On 1.47.0, I get errors of this form:
Context
Meta
The issue also appears on beta and nightly (and also on Linux, judging by the Travis run).
rustc --version --verbose
:Macro Backtrace
RUSTFLAGS="-Z macro-backtrace" cargo +nightly build
(excerpt):The text was updated successfully, but these errors were encountered: