Remove from librustdoc and clippy too
This commit is contained in:
parent
868d099a72
commit
c4fa0d3ea6
9 changed files with 9 additions and 12 deletions
|
@ -61,14 +61,14 @@ impl HtmlWithLimit {
|
||||||
/// and returns [`ControlFlow::Break`].
|
/// and returns [`ControlFlow::Break`].
|
||||||
pub(super) fn push(&mut self, text: &str) -> ControlFlow<(), ()> {
|
pub(super) fn push(&mut self, text: &str) -> ControlFlow<(), ()> {
|
||||||
if self.len + text.len() > self.limit {
|
if self.len + text.len() > self.limit {
|
||||||
return ControlFlow::BREAK;
|
return ControlFlow::Break(());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.flush_queue();
|
self.flush_queue();
|
||||||
write!(self.buf, "{}", Escape(text)).unwrap();
|
write!(self.buf, "{}", Escape(text)).unwrap();
|
||||||
self.len += text.len();
|
self.len += text.len();
|
||||||
|
|
||||||
ControlFlow::CONTINUE
|
ControlFlow::Continue(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Open an HTML tag.
|
/// Open an HTML tag.
|
||||||
|
|
|
@ -83,7 +83,7 @@ fn past_the_limit() {
|
||||||
buf.push("word#")?;
|
buf.push("word#")?;
|
||||||
buf.push(&n.to_string())?;
|
buf.push(&n.to_string())?;
|
||||||
buf.close_tag();
|
buf.close_tag();
|
||||||
ControlFlow::CONTINUE
|
ControlFlow::Continue(())
|
||||||
});
|
});
|
||||||
buf.close_tag();
|
buf.close_tag();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|
|
@ -1188,18 +1188,18 @@ fn markdown_summary_with_limit(
|
||||||
Event::Start(tag) => match tag {
|
Event::Start(tag) => match tag {
|
||||||
Tag::Emphasis => buf.open_tag("em"),
|
Tag::Emphasis => buf.open_tag("em"),
|
||||||
Tag::Strong => buf.open_tag("strong"),
|
Tag::Strong => buf.open_tag("strong"),
|
||||||
Tag::CodeBlock(..) => return ControlFlow::BREAK,
|
Tag::CodeBlock(..) => return ControlFlow::Break(()),
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
Event::End(tag) => match tag {
|
Event::End(tag) => match tag {
|
||||||
Tag::Emphasis | Tag::Strong => buf.close_tag(),
|
Tag::Emphasis | Tag::Strong => buf.close_tag(),
|
||||||
Tag::Paragraph | Tag::Heading(..) => return ControlFlow::BREAK,
|
Tag::Paragraph | Tag::Heading(..) => return ControlFlow::Break(()),
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
Event::HardBreak | Event::SoftBreak => buf.push(" ")?,
|
Event::HardBreak | Event::SoftBreak => buf.push(" ")?,
|
||||||
_ => {}
|
_ => {}
|
||||||
};
|
};
|
||||||
ControlFlow::CONTINUE
|
ControlFlow::Continue(())
|
||||||
});
|
});
|
||||||
|
|
||||||
(buf.finish(), stopped_early)
|
(buf.finish(), stopped_early)
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#![feature(array_methods)]
|
#![feature(array_methods)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(control_flow_enum)]
|
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(is_terminal)]
|
#![feature(is_terminal)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#![feature(array_windows)]
|
#![feature(array_windows)]
|
||||||
#![feature(binary_heap_into_iter_sorted)]
|
#![feature(binary_heap_into_iter_sorted)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(control_flow_enum)]
|
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(iter_intersperse)]
|
#![feature(iter_intersperse)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
|
|
|
@ -54,7 +54,7 @@ fn collect_replace_calls<'tcx>(
|
||||||
from_args.push_front(from);
|
from_args.push_front(from);
|
||||||
ControlFlow::Continue(())
|
ControlFlow::Continue(())
|
||||||
} else {
|
} else {
|
||||||
ControlFlow::BREAK
|
ControlFlow::Break(())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ControlFlow::Continue(())
|
ControlFlow::Continue(())
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#![feature(array_chunks)]
|
#![feature(array_chunks)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(control_flow_enum)]
|
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(lint_reasons)]
|
#![feature(lint_reasons)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
|
|
@ -327,7 +327,7 @@ fn is_assert_arg(cx: &LateContext<'_>, expr: &Expr<'_>, assert_expn: ExpnId) ->
|
||||||
} else {
|
} else {
|
||||||
match cx.tcx.item_name(macro_call.def_id) {
|
match cx.tcx.item_name(macro_call.def_id) {
|
||||||
// `cfg!(debug_assertions)` in `debug_assert!`
|
// `cfg!(debug_assertions)` in `debug_assert!`
|
||||||
sym::cfg => ControlFlow::CONTINUE,
|
sym::cfg => ControlFlow::Continue(()),
|
||||||
// assert!(other_macro!(..))
|
// assert!(other_macro!(..))
|
||||||
_ => ControlFlow::Break(true),
|
_ => ControlFlow::Break(true),
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ impl TypeVisitor<'_> for ContainsRegion {
|
||||||
type BreakTy = ();
|
type BreakTy = ();
|
||||||
|
|
||||||
fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<Self::BreakTy> {
|
fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<Self::BreakTy> {
|
||||||
ControlFlow::BREAK
|
ControlFlow::Break(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue