Skip to content

Commit a6042f4

Browse files
authored
Unrolled build for rust-lang#133686
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 8ac313b + 484c561 commit a6042f4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ symbols! {
182182
ConstParamTy_,
183183
Context,
184184
Continue,
185+
ControlFlow,
185186
Copy,
186187
Cow,
187188
Debug,

library/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)