Updating to Rust 1.47.0 broke my build. What do I do now?

As the title says, I have a build that works fine on 1.46.0 (1.46.*, as far as I can tell) but is broken on 1.47.0.

I'm using try_match like this inside another match statement:

BasicPathElementKey::Plain(key) => try_match!(
	map::Entry::Vacant(vacant)
	= selection.entry(key.clone())
	=> vacant.insert(placeholder(key.span.start.clone()))
)
.debugless_unwrap(),

I'm at a bit of all loss here, since I don't know how to narrow down the problem.
The errors are reported as being from a macro and unfortunately cargo expand and -Z macro-backtrace don't seem to go further than telling me that proc_macro_hack/an inner procedural macro is involved.

Should I report this anywhere? If so, where?

Aside: If you look at my Travis config, you'll notice that I ran into this on beta earlier. I probably should have gone after the issue right then, but life was happening.

Apologies in case it turns out to be something I should have reported back then.

No worries. Noone is obliged to report any bugs on the Rust compiler. Thank you for wanting to report it now.

Updating rustc should usually not break any builds, so if this is a straightforward case of “the same thing works on 1.46 and doesn’t work on 1.47” then it’s most likely a bug in rustc. The place to report this would be the rustc issue tracker. Since it’s an open-source project it should be easy to give a brief explanation as to how to reproduce this.

2 Likes

Would it be okay to write something like

git clone https://github.com/Tamschi/taml.git
cd taml
cargo build

for the reproduction steps? I did try to narrow it down a bit the first time around, but couldn't come up with a small isolated example where the build failed like this.

If it’s literally just doing cargo build on the repo’s master branch, say that. It would probably be useful to at least also mention (and perhaps link) the commit hash, or even make a new branch for this, so that in case there are changes to master in the future (and I bet there will be) the description of how to reproduce the bug still works (at least until the bug is fixed). You don’t actually need to provide a step-by-step instruction on how a git repo is cloned and a directory is entered, people already know this. If you have an isolated example it’s nice to have, but there’s many community members out there willing to help reducing examples for bugs, so there’s no burden on you, and for now you should as a first step report it as is anyways.

3 Likes

I created a misc/rustc-bug-report tag and filed an issue at https://github.com/rust-lang/rust/issues/77789. Thank you!