-
Notifications
You must be signed in to change notification settings - Fork 13.4k
use matches!() macro in more places #90642
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
ty::BoundConstness::ConstIfConst if self.is_in_const_context => true, | ||
_ => false, | ||
} | ||
matches!(pred.constness, ty::BoundConstness::ConstIfConst if self.is_in_const_context) |
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.
matches!(pred.constness, ty::BoundConstness::ConstIfConst if self.is_in_const_context) | |
matches!(pred.constness, ty::BoundConstness::ConstIfConst) && self.is_in_const_context |
compiler/rustc_typeck/src/structured_errors/wrong_number_of_generic_args.rs
Outdated
Show resolved
Hide resolved
| Ok(Some(ImplSource::Param(_, ty::BoundConstness::ConstIfConst))) => false, | ||
_ => true, | ||
} | ||
| Ok(Some(ImplSource::Param(_, ty::BoundConstness::ConstIfConst))) |
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.
is this a candidate for "interior patterns": Ok(Some(ImplSource::ConstDrop(_) | ImplSource::Param(...)))
5585ffb
to
5aa9688
Compare
@rustbot ready |
5aa9688
to
0a5640b
Compare
@bors r+ rollup |
📌 Commit 0a5640b has been approved by |
…llot use matches!() macro in more places
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#90487 (Add a chapter on reading Rustdoc output) - rust-lang#90508 (Apply adjustments for field expression even if inaccessible) - rust-lang#90627 (Suggest dereference of `Box` when inner type is expected) - rust-lang#90642 (use matches!() macro in more places) - rust-lang#90646 (type error go brrrrrrrr) - rust-lang#90649 (Run reveal_all on MIR when inlining is activated.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Enable rustbot shortcuts for rust-clippy This enables shortcuts for ``@rustbot`.` Just a quality of life feature for contributors. |Shortcut| Full comment | |---|---| | ``@rustbot` ready` | ``@rustbot` label -S-waiting-on-author +S-waiting-on-review` | | ``@rustbot` author` | ``@rustbot` label +S-waiting-on-author -S-waiting-on-review` | See: https://github.com/rust-lang/triagebot/wiki/Shortcuts The documentation also states that the author/assignee will be pinged. However, this doesn't seem to be the case, it at least hasn't done so for me and in this [PR](rust-lang/rust#90642 (comment)) --- changelog: none
No description provided.