-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use ControlFlow
results for visitors that are only looking for a single value
#127366
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
changes to the core type system |
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.
Also IDK why you named this " allow HIR visitors to directly return booleans" but also touched type visitors in the rustc_type_ir
layer 😅
Because I forgot that the |
ControlFlow
results for visitors that are only looking for a single value
Removed the |
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! I quite like all these changes
@bors r+ rollup |
…r-errors Use `ControlFlow` results for visitors that are only looking for a single value These visitors all had a `Option<Value>` or `bool` field, that, once set, was never unset or modified again. They have been refactored by removing the field and returning `ControlFlow` directly from the visitor
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127333 (Split `SolverDelegate` back out from `InferCtxtLike`) - rust-lang#127363 (Improve readability of some fmt code examples) - rust-lang#127366 (Use `ControlFlow` results for visitors that are only looking for a single value) - rust-lang#127368 (Added dots at the sentence ends of rustc AST doc) - rust-lang#127369 (Match ergonomics 2024: align with RFC again) - rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`) - rust-lang#127383 (Use verbose style for argument removal suggestion) r? `@ghost` `@rustbot` modify labels: rollup
…r-errors Use `ControlFlow` results for visitors that are only looking for a single value These visitors all had a `Option<Value>` or `bool` field, that, once set, was never unset or modified again. They have been refactored by removing the field and returning `ControlFlow` directly from the visitor
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#123600 (impl PathBuf::add_extension and Path::with_added_extension) - rust-lang#126987 (out_of_scope_macro_calls: Detect calls inside attributes more precisely) - rust-lang#127107 (Improve dead code analysis) - rust-lang#127221 (Improve well known value check-cfg diagnostic for the standard library) - rust-lang#127333 (Split `SolverDelegate` back out from `InferCtxtLike`) - rust-lang#127363 (Improve readability of some fmt code examples) - rust-lang#127366 (Use `ControlFlow` results for visitors that are only looking for a single value) - rust-lang#127368 (Added dots at the sentence ends of rustc AST doc) - rust-lang#127369 (Match ergonomics 2024: align with RFC again) - rust-lang#127383 (Use verbose style for argument removal suggestion) - rust-lang#127393 (Remove clubby789 from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 8 pull requests Successful merges: - rust-lang#123600 (impl PathBuf::add_extension and Path::with_added_extension) - rust-lang#127107 (Improve dead code analysis) - rust-lang#127221 (Improve well known value check-cfg diagnostic for the standard library) - rust-lang#127333 (Split `SolverDelegate` back out from `InferCtxtLike`) - rust-lang#127363 (Improve readability of some fmt code examples) - rust-lang#127366 (Use `ControlFlow` results for visitors that are only looking for a single value) - rust-lang#127368 (Added dots at the sentence ends of rustc AST doc) - rust-lang#127393 (Remove clubby789 from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127366 - oli-obk:falliblevisitor, r=compiler-errors Use `ControlFlow` results for visitors that are only looking for a single value These visitors all had a `Option<Value>` or `bool` field, that, once set, was never unset or modified again. They have been refactored by removing the field and returning `ControlFlow` directly from the visitor
These visitors all had a
Option<Value>
orbool
field, that, once set, was never unset or modified again. They have been refactored by removing the field and returningControlFlow
directly from the visitor