Skip to content

Commit

Permalink
Rollup merge of rust-lang#107398 - scottmcm:its-their-funeral, r=dtolnay
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthiaskrgr authored Jan 28, 2023
2 parents 06e7855 + e65a7ff commit a493717
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![feature(array_windows)]
#![feature(binary_heap_into_iter_sorted)]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
#![feature(drain_filter)]
#![feature(iter_intersperse)]
#![feature(let_chains)]
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/collapsible_str_replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn collect_replace_calls<'tcx>(
from_args.push_front(from);
ControlFlow::Continue(())
} else {
ControlFlow::BREAK
ControlFlow::Break(())
}
} else {
ControlFlow::Continue(())
Expand Down
1 change: 0 additions & 1 deletion clippy_utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![feature(array_chunks)]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
#![feature(let_chains)]
#![feature(lint_reasons)]
#![feature(never_type)]
Expand Down
2 changes: 1 addition & 1 deletion clippy_utils/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ fn is_assert_arg(cx: &LateContext<'_>, expr: &Expr<'_>, assert_expn: ExpnId) ->
} else {
match cx.tcx.item_name(macro_call.def_id) {
// `cfg!(debug_assertions)` in `debug_assert!`
sym::cfg => ControlFlow::CONTINUE,
sym::cfg => ControlFlow::Continue(()),
// assert!(other_macro!(..))
_ => ControlFlow::Break(true),
}
Expand Down
2 changes: 1 addition & 1 deletion clippy_utils/src/mir/possible_borrower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl TypeVisitor<'_> for ContainsRegion {
type BreakTy = ();

fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<Self::BreakTy> {
ControlFlow::BREAK
ControlFlow::Break(())
}
}

Expand Down

0 comments on commit a493717

Please sign in to comment.