-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Denote ControlFlow
as #[must_use]
#137449
Conversation
This comment has been minimized.
This comment has been minimized.
@rfcbot merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I've checked my box. But also, as a procedural matter, |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
True, but we only had 3 people in the libs-api meeting when this came up (of which I was the only libs-api member). It was easier to just start an FCP. |
9938952
to
04821e4
Compare
Some changes occurred in src/tools/clippy cc @rust-lang/clippy rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
04821e4
to
7a6e87b
Compare
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
☔ The latest upstream changes (presumably #138448) made this pull request unmergeable. Please resolve the merge conflicts. |
r=me once conflicts are resolved. |
7a6e87b
to
e250bd1
Compare
Some changes occurred in compiler/rustc_codegen_ssa |
hey @rust-lang/rust-analyzer, just pinging that while I said that I'd split this into a separate PR in the description:
I've decided that's probably just a lot of work for no benefit at this point. Since we enforce no warnings in CI, and since this makes a new warning in CI that I need to fix for all tools we build in-tree, it's definitely not worth fixing this (for example) as a separate PR on the r-a repo and waiting for a subtree sync rather than just fixing it here. If y'all disagree, I'm happy to coordinate this somehow, but I'd prefer if we didn't unnecessarily block landing this PR. |
I don't think that should be an issue though I delegate that decision to @lnicola given I am not the one doing the syncs |
@bors r=Amanieu,lnicola |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133870 (Stabilize `asm_goto` feature gate) - rust-lang#137449 (Denote `ControlFlow` as `#[must_use]`) - rust-lang#137465 (mir_build: Avoid some useless work when visiting "primary" bindings) - rust-lang#138349 (Emit function declarations for functions with `#[linkage="extern_weak"]`) - rust-lang#138412 (Install licenses into `share/doc/rust/licenses`) - rust-lang#138577 (rustdoc-json: Don't also include `#[deprecated]` in `Item::attrs`) - rust-lang#138588 (Avoid double lowering of idents) Failed merges: - rust-lang#138321 ([bootstrap] Distribute split debuginfo if present) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137449 - compiler-errors:control-flow, r=Amanieu,lnicola Denote `ControlFlow` as `#[must_use]` I've repeatedly hit bugs in the compiler due to `ControlFlow` not being marked `#[must_use]`. There seems to be an accepted ACP to make the type `#[must_use]` (rust-lang/libs-team#444), so this PR implements that part of it. Most of the usages in the compiler that trigger this new warning are "root" usages (calling into an API that uses control-flow internally, but for which the callee doesn't really care) and have been suppressed by `let _ = ...`, but I did legitimately find one instance of a missing `?` and one for a never-used `ControlFlow` value in rust-lang#137448. Presumably this needs an FCP too, so I'm opening this and nominating it for T-libs-api. This PR also touches the tools (incl. rust-analyzer), but if this went into FCP, I'd split those out into separate PRs which can land before this one does. r? libs-api `@rustbot` label: T-libs-api I-libs-api-nominated
I've repeatedly hit bugs in the compiler due to
ControlFlow
not being marked#[must_use]
. There seems to be an accepted ACP to make the type#[must_use]
(rust-lang/libs-team#444), so this PR implements that part of it.Most of the usages in the compiler that trigger this new warning are "root" usages (calling into an API that uses control-flow internally, but for which the callee doesn't really care) and have been suppressed by
let _ = ...
, but I did legitimately find one instance of a missing?
and one for a never-usedControlFlow
value in #137448.Presumably this needs an FCP too, so I'm opening this and nominating it for T-libs-api.
This PR also touches the tools (incl. rust-analyzer), but if this went into FCP, I'd split those out into separate PRs which can land before this one does.
r? libs-api
@rustbot label: T-libs-api I-libs-api-nominated