Skip to content

Commit

Permalink
add bootstrap and librustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Jan 5, 2025
1 parent d035c5a commit 78d2eca
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
uses: crate-ci/[email protected]
with:
# sync target files with src/tools/tidy/src/ext_tool_checks.rs
files: ./compiler ./library
files: ./compiler ./library ./src/bootstrap ./src/librustdoc
config: ./typos.toml
2 changes: 1 addition & 1 deletion src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
ChangeInfo {
change_id: 121976,
severity: ChangeSeverity::Info,
summary: "A new `boostrap-cache-path` option has been introduced which can be utilized to modify the cache path for bootstrap.",
summary: "A new `bootstrap-cache-path` option has been introduced which can be utilized to modify the cache path for bootstrap.",
},
ChangeInfo {
change_id: 122108,
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/html/markdown/footnotes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<'a, I: Iterator<Item = SpannedEvent<'a>>> Footnotes<'a, I> {
let key = key.to_owned();
let FootnoteDef { content, id } =
self.footnotes.entry(key).or_insert(FootnoteDef { content: Vec::new(), id: new_id });
// Don't allow changing the ID of existing entrys, but allow changing the contents.
// Don't allow changing the ID of existing entries, but allow changing the contents.
(content, *id)
}

Expand Down Expand Up @@ -82,7 +82,7 @@ impl<'a, I: Iterator<Item = SpannedEvent<'a>>> Iterator for Footnotes<'a, I> {
return Some((self.handle_footnote_reference(reference), range));
}
Some((Event::Start(Tag::FootnoteDefinition(def)), _)) => {
// When we see a footnote definition, collect the assocated content, and store
// When we see a footnote definition, collect the associated content, and store
// that for rendering later.
let content = self.collect_footnote_def();
let (entry_content, _) = self.get_entry(&def);
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,7 @@ fn render_impl(
// 3. Functions
//
// This order is because you can have associated constants used in associated types (like array
// length), and both in associcated functions. So with this order, when reading from top to
// length), and both in associated functions. So with this order, when reading from top to
// bottom, you should see items definitions before they're actually used most of the time.
let mut assoc_types = Vec::new();
let mut methods = Vec::new();
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/write_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ impl CratesIndexPart {
}
}

/// Might return parts that are duplicate with ones in prexisting index.html
/// Might return parts that are duplicate with ones in preexisting index.html
fn get(crate_name: &str, external_crates: &[String]) -> Result<PartsAndLocations<Self>, Error> {
let mut ret = PartsAndLocations::default();
let path = PathBuf::from("index.html");
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
// 300px, and the RUSTDOC_MOBILE_BREAKPOINT is 700px, so BODY_MIN must be
// at most 400px. Otherwise, it would start out at the default size, then
// grabbing the resize handle would suddenly cause it to jank to
// its contraint-generated maximum.
// its constraint-generated maximum.
const RUSTDOC_MOBILE_BREAKPOINT = 700;
const BODY_MIN = 400;
// At half-way past the minimum size, vanish the sidebar entirely
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/passes/strip_aliased_non_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct NonLocalStripper<'tcx> {
impl DocFolder for NonLocalStripper<'_> {
fn fold_item(&mut self, i: Item) -> Option<Item> {
// If not local, we want to respect the original visibility of
// the field and not the one given by the user for the currrent crate.
// the field and not the one given by the user for the current crate.
//
// FIXME(#125009): Not-local should probably consider same Cargo workspace
if let Some(def_id) = i.def_id()
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/passes/strip_hidden.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl DocFolder for Stripper<'_, '_> {
self.update_retained = old;
if ret.item_id == clean::ItemId::DefId(CRATE_DEF_ID.into()) {
// We don't strip the current crate, even if it has `#[doc(hidden)]`.
debug!("strip_hidden: Not strippping local crate");
debug!("strip_hidden: Not stripping local crate");
Some(ret)
} else {
Some(strip_item(ret))
Expand Down
10 changes: 8 additions & 2 deletions src/tools/tidy/src/ext_tool_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,14 @@ fn check_impl(
if spellcheck_all || spellcheck_fix {
let config_path = root_path.join("typos.toml");
// sync target files with .github/workflows/ci.yml
let mut args =
vec!["-c", config_path.as_os_str().to_str().unwrap(), "./compiler", "./library"];
let mut args = vec![
"-c",
config_path.as_os_str().to_str().unwrap(),
"./compiler",
"./library",
"./src/bootstrap",
"./src/librustdoc",
];

if spellcheck_all {
eprintln!("spellcheck files");
Expand Down
1 change: 1 addition & 0 deletions typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ extend-ignore-re = [
"\\.arg\\(\"Oh no, a tpyo!\"\\)",
# string used in benches
"\"core::iter::adapters::Copie\"",
"-Ccontrol-flow-guard",
]

0 comments on commit 78d2eca

Please sign in to comment.