mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 20:34:06 +00:00
Rollup merge of #133686 - samueltardieu:push-xkxwxzxqokuu, r=compiler-errors
Add diagnostic item for `std::ops::ControlFlow` This will be used in Clippy to detect useless conversions done through `ControlFlow::map_break()` and `ControlFlow::map_continue()`.
This commit is contained in:
commit
3d365795fa
@ -182,6 +182,7 @@ symbols! {
|
||||
ConstParamTy_,
|
||||
Context,
|
||||
Continue,
|
||||
ControlFlow,
|
||||
Copy,
|
||||
Cow,
|
||||
Debug,
|
||||
|
@ -79,6 +79,7 @@ use crate::{convert, ops};
|
||||
/// [`Break`]: ControlFlow::Break
|
||||
/// [`Continue`]: ControlFlow::Continue
|
||||
#[stable(feature = "control_flow_enum_type", since = "1.55.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "ControlFlow")]
|
||||
// ControlFlow should not implement PartialOrd or Ord, per RFC 3058:
|
||||
// https://rust-lang.github.io/rfcs/3058-try-trait-v2.html#traits-for-controlflow
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
|
Loading…
Reference in New Issue
Block a user