Skip to content

Commit 23f7ead

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#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()`.
2 parents 769f93a + 5e68193 commit 23f7ead

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: core/src/ops/control_flow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ use crate::{convert, ops};
7979
/// [`Break`]: ControlFlow::Break
8080
/// [`Continue`]: ControlFlow::Continue
8181
#[stable(feature = "control_flow_enum_type", since = "1.55.0")]
82+
#[cfg_attr(not(test), rustc_diagnostic_item = "ControlFlow")]
8283
// ControlFlow should not implement PartialOrd or Ord, per RFC 3058:
8384
// https://rust-lang.github.io/rfcs/3058-try-trait-v2.html#traits-for-controlflow
8485
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)