Skip to content

Commit c4fa0d3

Browse files
committed
Remove from librustdoc and clippy too
1 parent 868d099 commit c4fa0d3

File tree

9 files changed

+9
-12
lines changed

9 files changed

+9
-12
lines changed

src/librustdoc/html/length_limit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ impl HtmlWithLimit {
6161
/// and returns [`ControlFlow::Break`].
6262
pub(super) fn push(&mut self, text: &str) -> ControlFlow<(), ()> {
6363
if self.len + text.len() > self.limit {
64-
return ControlFlow::BREAK;
64+
return ControlFlow::Break(());
6565
}
6666

6767
self.flush_queue();
6868
write!(self.buf, "{}", Escape(text)).unwrap();
6969
self.len += text.len();
7070

71-
ControlFlow::CONTINUE
71+
ControlFlow::Continue(())
7272
}
7373

7474
/// Open an HTML tag.

src/librustdoc/html/length_limit/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn past_the_limit() {
8383
buf.push("word#")?;
8484
buf.push(&n.to_string())?;
8585
buf.close_tag();
86-
ControlFlow::CONTINUE
86+
ControlFlow::Continue(())
8787
});
8888
buf.close_tag();
8989
assert_eq!(

src/librustdoc/html/markdown.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1188,18 +1188,18 @@ fn markdown_summary_with_limit(
11881188
Event::Start(tag) => match tag {
11891189
Tag::Emphasis => buf.open_tag("em"),
11901190
Tag::Strong => buf.open_tag("strong"),
1191-
Tag::CodeBlock(..) => return ControlFlow::BREAK,
1191+
Tag::CodeBlock(..) => return ControlFlow::Break(()),
11921192
_ => {}
11931193
},
11941194
Event::End(tag) => match tag {
11951195
Tag::Emphasis | Tag::Strong => buf.close_tag(),
1196-
Tag::Paragraph | Tag::Heading(..) => return ControlFlow::BREAK,
1196+
Tag::Paragraph | Tag::Heading(..) => return ControlFlow::Break(()),
11971197
_ => {}
11981198
},
11991199
Event::HardBreak | Event::SoftBreak => buf.push(" ")?,
12001200
_ => {}
12011201
};
1202-
ControlFlow::CONTINUE
1202+
ControlFlow::Continue(())
12031203
});
12041204

12051205
(buf.finish(), stopped_early)

src/librustdoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![feature(array_methods)]
77
#![feature(assert_matches)]
88
#![feature(box_patterns)]
9-
#![feature(control_flow_enum)]
109
#![feature(drain_filter)]
1110
#![feature(is_terminal)]
1211
#![feature(let_chains)]

src/tools/clippy/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)]

src/tools/clippy/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(())

src/tools/clippy/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)]

src/tools/clippy/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
}

src/tools/clippy/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)