-
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
change the order of type arguments on ControlFlow #76614
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @scottmcm |
4098cac
to
09111dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides the one nit. I'll let @scottmcm have a look though.
@@ -87,8 +87,7 @@ where | |||
} | |||
|
|||
/// Allows searches to terminate early with a value. | |||
// FIXME (#75744): remove the alias once the generics are in a better order and `C=()`. | |||
pub type ControlFlow<T> = std::ops::ControlFlow<(), T>; | |||
pub use std::ops::ControlFlow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-exporting a standard library type is somewhat unusual, could you change the use sites to import std::ops::ControlFlow
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @NoraCodes! I agree with morse's nit, then LGTM after that.
@NoraCodes It looks like this is very close to being ready to merge! Could you address #76614 (comment)? |
Will do, apologies for taking so long on this. |
No worries :) |
Finally actually got around to setting up a Rust dev environment on my personal machine. 😅 |
Thanks, @NoraCodes! @bors r+ rollup=iffy |
📌 Commit a41795650c73a412a79aef06e71d068e2b707d8a has been approved by |
@NoraCodes This conflicted with #78200, you'll have to rebase to merge this PR. |
This allows ControlFlow<BreakType> which is much more ergonomic for common iterator combinator use cases.
a417956
to
bc23179
Compare
Rebased. @bors r+ |
📌 Commit bc23179 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
…as-schievink Rollup of 12 pull requests Successful merges: - rust-lang#75115 (`#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi) - rust-lang#76614 (change the order of type arguments on ControlFlow) - rust-lang#77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex) - rust-lang#77830 (Simplify query proc-macros) - rust-lang#77930 (Do not ICE with TraitPredicates containing [type error]) - rust-lang#78069 (Fix const core::panic!(non_literal_str).) - rust-lang#78072 (Cleanup constant matching in exhaustiveness checking) - rust-lang#78119 (Throw core::panic!("message") as &str instead of String.) - rust-lang#78191 (Introduce a temporary for discriminant value in MatchBranchSimplification) - rust-lang#78272 (const_evaluatable_checked: deal with unused nodes + div) - rust-lang#78318 (TyCtxt: generate single impl block with `slice_interners` macro) - rust-lang#78327 (resolve: Relax macro resolution consistency check to account for any errors) Failed merges: r? `@ghost`
…ulacrum [beta] next This backports: * Avoid installing external LLVM dylibs rust-lang#78986 * Install CI llvm into the library directory rust-lang#79074 * Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case"" rust-lang#78784 * Bump Rustfmt and RLS rust-lang#78775 * Enforce no-move rule of ReentrantMutex using Pin and fix UB in stdio rust-lang#77801 For RLS/rustfmt compilation to succeed: * change the order of type arguments on ControlFlow rust-lang#76614 * Add ControlFlow::is_{break,continue} methods rust-lang#78200 * Replace run_compiler with RunCompiler builder pattern rust-lang#77649 As a dependency of rust-lang#77801: * Add Pin::static_ref, static_mut. rust-lang#77726
This allows
ControlFlow<BreakType>
which is much more ergonomic for common iterator combinator use cases.Addresses one component of #75744