-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add extensive set of drop order tests #133605
base: master
Are you sure you want to change the base?
Add extensive set of drop order tests #133605
Conversation
@dingxiangfei2009: This set of tests fails on |
This comment has been minimized.
This comment has been minimized.
16cf80f
to
9db5de5
Compare
This comment has been minimized.
This comment has been minimized.
9db5de5
to
4a98806
Compare
This comment has been minimized.
This comment has been minimized.
4a98806
to
a967277
Compare
Originally, this had... #![cfg_attr(e2021, warn(rust_2024_compatibility))] ...but this was causing a different number of warnings to be generated in the CI llvm-18 test from what I could reproduce (or bless) in testing locally. It was a "nice to have", so I'm removed it for now to make this PR ready and to land these tests. Similarly, this originally had... //@ [e2021] run-rustfix ...but the automated lints don't migrate all the code, so it fails since there are still diagnostics emitted in the fixed version. It too was a "nice to have", so I've similarly removed it. Both of these could be added back in separate PRs later. |
@traviscross They did not apply intentionally because migrating spans inside macro is considered "risky" and error-prone. The suggestion might apply but we won't know for sure if the macro would do something entirely different. I hope this still remains a reasonable compromise. |
a967277
to
5354ea4
Compare
This comment has been minimized.
This comment has been minimized.
@dingxiangfei2009: Thanks. I've updated the test to remove use of One last issue: My local build produces 15 warnings, and so that's what I get when blessing the test. But the CI sees 10 warnings. This is fully rebased, and using stage 2 to run the test. Any idea what might be causing this? |
Specifically, the CI seems to not be emitting the |
CI tests enables a I am investigating. |
The I have a theory. The test mode only changes when Follow-up: Yes, dropping |
@jieyouxu: What do you think about the situation above with respect to |
I'll take a look in a bit |
@dingxiangfei2009 your analysis is spot on. You can use // Lints are emitted past the borrow-checking phase, i.e. unavailable in
// `--pass=check`.
//@ ignore-pass to instruct compiletest to not respect |
3954148
to
4620f47
Compare
This comment was marked as resolved.
This comment was marked as resolved.
4620f47
to
dabe224
Compare
On lang, we've recently been discussing the drop order with respect to `let` chains apropos of how we shortened temporary lifetimes in Rust 2024 and how we may shorten them further in the future. Here we add an extensive set of tests that demonstrate the drop order in the cases that interest us.
dabe224
to
035889d
Compare
@rustbot ready |
Hi, it looks like this PR is only waiting on review at this point, or is it blocked on something? Just checking in since I'd love to see #132833 make it into the 2024 edition (if that's still the plan) |
@esote yes I think this is blocked on review only now. But there is other real blockers for #132833 as well. The 2024 edition will ship without let chains (it's less than 7 weeks until when it's released), but the breaking changes we need are already in place so we'll just stabilize whenever the blockers unblock (and then on edition 2024+ only). |
On lang, we've recently been discussing the drop order with respect to
let
chains apropos of how we shortened temporary lifetimes in Rust 2024 and how we may shorten them further in the future.Here we add an extensive set of tests that demonstrate the drop order in the cases that interest us.
Regarding the let chains stabilization prompting this analysis, see:
r? ghost
cc @ehuss @dingxiangfei2009 @nikomatsakis