Skip to content

Commit a493717

Browse files
authored
Rollup merge of rust-lang#107398 - scottmcm:its-their-funeral, r=dtolnay
Remove `ControlFlow::{BREAK, CONTINUE}` Libs-API decided to remove these in rust-lang#102697. Follow-up to rust-lang#107023, which removed them from `compiler/`, but a couple new ones showed up since that was merged. r? libs
2 parents 06e7855 + e65a7ff commit a493717

File tree

5 files changed

+3
-5
lines changed

5 files changed

+3
-5
lines changed

clippy_lints/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(array_windows)]
22
#![feature(binary_heap_into_iter_sorted)]
33
#![feature(box_patterns)]
4-
#![feature(control_flow_enum)]
54
#![feature(drain_filter)]
65
#![feature(iter_intersperse)]
76
#![feature(let_chains)]

clippy_lints/src/methods/collapsible_str_replace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn collect_replace_calls<'tcx>(
5454
from_args.push_front(from);
5555
ControlFlow::Continue(())
5656
} else {
57-
ControlFlow::BREAK
57+
ControlFlow::Break(())
5858
}
5959
} else {
6060
ControlFlow::Continue(())

clippy_utils/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(array_chunks)]
22
#![feature(box_patterns)]
3-
#![feature(control_flow_enum)]
43
#![feature(let_chains)]
54
#![feature(lint_reasons)]
65
#![feature(never_type)]

clippy_utils/src/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ fn is_assert_arg(cx: &LateContext<'_>, expr: &Expr<'_>, assert_expn: ExpnId) ->
327327
} else {
328328
match cx.tcx.item_name(macro_call.def_id) {
329329
// `cfg!(debug_assertions)` in `debug_assert!`
330-
sym::cfg => ControlFlow::CONTINUE,
330+
sym::cfg => ControlFlow::Continue(()),
331331
// assert!(other_macro!(..))
332332
_ => ControlFlow::Break(true),
333333
}

clippy_utils/src/mir/possible_borrower.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl TypeVisitor<'_> for ContainsRegion {
140140
type BreakTy = ();
141141

142142
fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<Self::BreakTy> {
143-
ControlFlow::BREAK
143+
ControlFlow::Break(())
144144
}
145145
}
146146

0 commit comments

Comments
 (0)