sse2
only."
+ sse2
only."
);
})
}
diff --git a/src/librustdoc/clean/utils.rs b/src/librustdoc/clean/utils.rs
index 75fdcd5ec1c..8255bdab4f5 100644
--- a/src/librustdoc/clean/utils.rs
+++ b/src/librustdoc/clean/utils.rs
@@ -422,14 +422,13 @@ pub fn name_from_pat(p: &hir::Pat<'_>) -> String {
PatKind::Ref(ref p, _) => name_from_pat(&**p),
PatKind::Lit(..) => {
warn!(
- "tried to get argument name from PatKind::Lit, \
- which is silly in function arguments"
+ "tried to get argument name from PatKind::Lit, which is silly in function arguments"
);
"()".to_string()
}
PatKind::Range(..) => panic!(
"tried to get argument name from PatKind::Range, \
- which is not allowed in function arguments"
+ which is not allowed in function arguments"
),
PatKind::Slice(ref begin, ref mid, ref end) => {
let begin = begin.iter().map(|p| name_from_pat(&**p));
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs
index 14df4e7aa8e..a5fc0757816 100644
--- a/src/librustdoc/config.rs
+++ b/src/librustdoc/config.rs
@@ -416,14 +416,12 @@ impl Options {
return Err(1);
} else if !ret.is_empty() {
diag.struct_warn(&format!(
- "theme file \"{}\" is missing CSS rules from the \
- default theme",
+ "theme file \"{}\" is missing CSS rules from the default theme",
theme_s
))
.warn("the theme may appear incorrect when loaded")
.help(&format!(
- "to see what rules are missing, call `rustdoc \
- --check-theme \"{}\"`",
+ "to see what rules are missing, call `rustdoc --check-theme \"{}\"`",
theme_s
))
.emit();
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 7c89b38a92c..074a43f2a70 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -561,8 +561,7 @@ fn run_global_ctxt(
if let Some(ref m) = krate.module {
if let None | Some("") = m.doc_value() {
let help = "The following guide may be of use:\n\
- https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation\
- .html";
+ https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation.html";
tcx.struct_lint_node(
rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS,
ctxt.as_local_hir_id(m.def_id).unwrap(),
@@ -581,7 +580,7 @@ fn run_global_ctxt(
.struct_warn(&format!("the `#![doc({})]` attribute is considered deprecated", name));
msg.warn(
"see issue #44136 baz
❤ #quxbaz
❤ #qux\
+ ",
);
}
@@ -174,38 +175,32 @@ fn test_header_ids_multiple_blocks() {
t(
&mut map,
"# Example",
- "Struct {{ .. }}
syntax; cannot be \
- matched against without a wildcard ..
; and \
- struct update syntax will not work."
+ Therefore, non-exhaustive structs cannot be constructed in external crates \
+ using the traditional Struct {{ .. }}
syntax; cannot be \
+ matched against without a wildcard ..
; and \
+ struct update syntax will not work."
);
} else if item.is_enum() {
write!(
w,
"Non-exhaustive enums could have additional variants added in future. \
- Therefore, when matching against variants of non-exhaustive enums, an \
- extra wildcard arm must be added to account for any future variants."
+ Therefore, when matching against variants of non-exhaustive enums, an \
+ extra wildcard arm must be added to account for any future variants."
);
} else if item.is_variant() {
write!(
w,
"Non-exhaustive enum variants could have additional fields added in future. \
- Therefore, non-exhaustive enum variants cannot be constructed in external \
- crates and cannot be matched against."
+ Therefore, non-exhaustive enum variants cannot be constructed in external \
+ crates and cannot be matched against."
);
} else {
write!(
w,
- "This type will require a wildcard arm in any match statements or \
- constructors."
+ "This type will require a wildcard arm in any match statements or constructors."
);
}
@@ -2096,12 +2096,11 @@ fn item_module(w: &mut Buffer, cx: &Context, item: &clean::Item, items: &[clean:
let doc_value = myitem.doc_value().unwrap_or("");
write!(
w,
- "\
- {name}: {ty}
\
- ",
+ \
+ {name}: {ty}
\
+ ",
item_type = ItemType::StructField,
id = id,
name = field.name.as_ref().unwrap(),
@@ -2954,9 +2950,9 @@ fn item_union(w: &mut Buffer, cx: &Context, it: &clean::Item, s: &clean::Union,
write!(
w,
"\
- \
- {name}: {ty}
\
- ",
+ \
+ {name}: {ty}
\
+ ",
id = id,
name = name,
shortty = ItemType::StructField,
@@ -3081,9 +3077,9 @@ fn item_enum(w: &mut Buffer, cx: &Context, it: &clean::Item, e: &clean::Enum, ca
write!(
w,
"\
- \
- {f}: {t}\
-
",
+ \
+ {f}: {t}
\
+ ",
id = id,
f = field.name.as_ref().unwrap(),
t = ty.print()
@@ -3296,23 +3292,19 @@ fn render_assoc_items(
AssocItemRender::All => {
write!(
w,
- "\
- ",
+ ",
impl_.for_.print()
));
trait_.push_str(&impl_.for_.print().to_string());
@@ -3909,8 +3896,8 @@ fn print_sidebar(cx: &Context, it: &clean::Item, buffer: &mut Buffer, cache: &Ca
write!(
buffer,
"\
- Version {}
\
- ",
+ Version {}
\
+