Skip to content

Commit b410f3f

Browse files
committed
Fix typos in librustdoc
1 parent a732883 commit b410f3f

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ impl Variant {
20192019

20202020
#[derive(Clone, Debug)]
20212021
pub(crate) struct Discriminant {
2022-
// In the case of cross crate re-exports, we don't have the nessesary information
2022+
// In the case of cross crate re-exports, we don't have the necessary information
20232023
// to reconstruct the expression of the discriminant, only the value.
20242024
pub(super) expr: Option<BodyId>,
20252025
pub(super) value: DefId,

src/librustdoc/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ pub(crate) struct RenderOptions {
230230
pub(crate) extension_css: Option<PathBuf>,
231231
/// A map of crate names to the URL to use instead of querying the crate's `html_root_url`.
232232
pub(crate) extern_html_root_urls: BTreeMap<String, String>,
233-
/// Whether to give precedence to `html_root_url` or `--exten-html-root-url`.
233+
/// Whether to give precedence to `html_root_url` or `--extern-html-root-url`.
234234
pub(crate) extern_html_root_takes_precedence: bool,
235235
/// A map of the default settings (values are as for DOM storage API). Keys should lack the
236236
/// `rustdoc-` prefix.

src/librustdoc/html/format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ pub(crate) fn print_where_clause<'a, 'tcx: 'a>(
349349
let mut br_with_padding = String::with_capacity(6 * indent + 28);
350350
br_with_padding.push_str("\n");
351351

352-
let padding_amout =
352+
let padding_amount =
353353
if ending == Ending::Newline { indent + 4 } else { indent + "fn where ".len() };
354354

355-
for _ in 0..padding_amout {
355+
for _ in 0..padding_amount {
356356
br_with_padding.push_str(" ");
357357
}
358358
let where_preds = where_preds.to_string().replace('\n', &br_with_padding);

src/librustdoc/html/render/print_item.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,10 +1796,11 @@ fn render_struct(
17961796
}
17971797
match ty {
17981798
None => {
1799-
let where_diplayed = g.map(|g| print_where_clause_and_check(w, g, cx)).unwrap_or(false);
1799+
let where_displayed =
1800+
g.map(|g| print_where_clause_and_check(w, g, cx)).unwrap_or(false);
18001801

18011802
// If there wasn't a `where` clause, we add a whitespace.
1802-
if !where_diplayed {
1803+
if !where_displayed {
18031804
w.write_str(" {");
18041805
} else {
18051806
w.write_str("{");

0 commit comments

Comments
 (0)