-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forbid $crate in macro patterns #99447
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
40d1cb8
to
8bb7a85
Compare
Not sure who the right reviewer is for this. Likely not me. r? rust-lang/compiler |
r? rust-lang/compiler |
The changes look reasonable to me, but 1) we should run crater and 2) @petrochenkov should take a look (it is a 3 line diff). @bors try |
🚨 Error: missing start toolchain 🆘 If you have any trouble with Crater please ping |
⌛ Trying commit 8bb7a85 with merge ff47dd48ed0d02534055e0033cf766ce528f8ebc... |
I think this is the right thing to do.
|
If the crater run comes back clean, I'd like to at least consider landing this as-is with the hard error. If it's not clean or that's too aggressive, I can switch this to a future-compatility lint. Ultimately, I'd like if (Doing so has knock-on benefits to #99035/#99445 as well.) That's only really a potential follow-up after we catch lhs |
I think it was just impossible before #51952, and after than nobody tried, I guess.
Probably the former. |
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
Cc rust-lang/crater#663, seems like whatever is causing that happened here too (not entirely unexpectedly) |
Of the crater-reported root regressions Legitimate
So this needs to be future incompatibility at worst. Spurious
Those unlisted here are all rust-lang/crater#663. |
@rustbot author I need to change this to a future-compat lint to not break ndarray |
Add catboost2-sys as flaky [build failed](https://crater-reports.s3.amazonaws.com/pr-99447/try%23ff47dd48ed0d02534055e0033cf766ce528f8ebc/reg/catboost2-sys-0.1.1%2Bcatboost.1.0.5/log.txt) in rust-lang/rust#99447 (comment); build requires rustfmt. I'm not sure if this is how best to note this, but I'm doing my part to try to help minimize spurious regressions.
They occured in two crater runs of two independent PRs, both in: rust-lang/rust#99447 (comment) And in: rust-lang/rust#103293 (comment)
They occured in two crater runs of two independent PRs, both in: rust-lang/rust#99447 (comment) And in: rust-lang/rust#103293 (comment)
They occured in two crater runs of two independent PRs, both in: rust-lang/rust#99447 (comment) And in: rust-lang/rust#103293 (comment)
They occured in two crater runs of two independent PRs, both in: rust-lang/rust#99447 (comment) And in: rust-lang/rust#103293 (comment)
They occured in two crater runs of two independent PRs, both in: rust-lang/rust#99447 (comment) And in: rust-lang/rust#103293 (comment)
They occured in two crater runs of two independent PRs, both in: rust-lang/rust#99447 (comment) And in: rust-lang/rust#103293 (comment)
Add catboost2-sys as flaky [build failed](https://crater-reports.s3.amazonaws.com/pr-99447/try%23ff47dd48ed0d02534055e0033cf766ce528f8ebc/reg/catboost2-sys-0.1.1%2Bcatboost.1.0.5/log.txt) in rust-lang/rust#99447 (comment); build requires rustfmt. I'm not sure if this is how best to note this, but I'm doing my part to try to help minimize spurious regressions.
@CAD97 any updates on this? |
I'm going to close this for now - feel free to re-open later if you have time to work on it. |
Fixes #99037. This currently implements a hard error because it was convenient to reuse the existing error for other disallowed metavars in the macro pattern, but should maybe be a forward-compat lint instead. Or maybe a clean crater run would justify just landing this directly as a hard error.