Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #110150

Closed
wants to merge 6 commits into from
Closed

Fix typos #110150

wants to merge 6 commits into from

Conversation

DaniPopes
Copy link
Contributor

@DaniPopes DaniPopes commented Apr 10, 2023

I ran typos to check for typos in this repo.

The first 3 commits are mostly automatic changes from running typos -w ./<dir>, while the rest are fixes that I've manually applied.

I have not included the config file because it's pretty ugly with a lot of manual exclusions but I can post it here if needed

@rustbot
Copy link
Collaborator

rustbot commented Apr 10, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-style Relevant to the style team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 10, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 10, 2023

rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing src/librustdoc/json/conversions.rs; otherwise, make sure you bump the FORMAT_VERSION constant.

cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

Some changes occurred in src/doc/style-guide

cc @rust-lang/style

Some changes occurred in need_type_info.rs

cc @lcnr

Copy link
Member

@Noratrieb Noratrieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.
This PR touches quite some things and is quite big. Could you split it up into separate PRs for compiler/library/rustdoc? Additionally, I see changes that seem incorrect, I've highlighted one of them. Could you check all the changes yourself again and make sure that you don't see any other problems? I've slimmed through some of the diff and most changes look good though.

AbiData { abi: Abi::PlatformIntrinsic, name: "platform-intrinsic" },
AbiData { abi: Abi::Unadjusted, name: "unadjusted" },
AbiData { abi: Abi::RustCold, name: "rust-cold" },
const AbiData: &[AbiDatum] = &[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct, AbiData is completely fine and correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AbiData (plural) is a list of AbiDatum (singular), "datas" doesn't exist. Should I still revert it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@@ -1428,8 +1428,8 @@ mod prim_ref {}
/// let ptr: fn(usize) -> usize = add_one;
/// assert_eq!(ptr(5), 6);
///
/// let clos: fn(usize) -> usize = |x| x + 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no reason to rename this random variable imo

@@ -1146,7 +1146,7 @@ impl str {
///
/// assert_eq!(s.find('L'), Some(0));
/// assert_eq!(s.find('é'), Some(14));
/// assert_eq!(s.find("pard"), Some(17));
/// assert_eq!(s.find("part"), Some(17));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what leads you to believe that this should've been named "part"? this is not right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed that one

);
i
}

#[inline]
pub fn data(self) -> &'static AbiData {
&AbiDatas[self.index()]
pub fn data(self) -> &'static AbiDatum {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of this PR is way too wide. Renaming structs in the compiler shouldn't be mixed with fixing comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll split it into separate PRs for compiler/library/rustdoc as @Nilstrieb mentioned

@DaniPopes
Copy link
Contributor Author

Closing in favor of #110153, #110154 and #110155.

@DaniPopes DaniPopes closed this Apr 10, 2023
@DaniPopes DaniPopes deleted the typos branch April 10, 2023 19:05
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
........................................................................................ 3344/4111
........................................................................................ 3432/4111
........................................................................................ 3520/4111
........................................................................................ 3608/4111
................................................................F..................F.... 3696/4111
........i........................i........................i........................i.... 3872/4111
....................i.....................i........................i.................... 3960/4111
....i........................i........................i................................. 4048/4111
...............................................................
---
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `None`,
 right: `Some(17)`', src/str/mod.rs:8:1
stack backtrace:
   0:     0x55ac6f8a8565 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h328e207c0fd2205c
   1:     0x55ac6f8c4088 - core::fmt::write::hf3b1e4fb936f95f6
   2:     0x55ac6f8a6961 - std::io::Write::write_fmt::hf1d0b0080eeddb6d
   3:     0x55ac6f8a8375 - std::sys_common::backtrace::print::h031dcf236c316efb
   4:     0x55ac6f8a9b94 - std::panicking::default_hook::{{closure}}::h9f518d39880907e1
   5:     0x55ac6f8a988b - std::panicking::default_hook::h689a8190a575275d
   6:     0x55ac6f8aa064 - std::panicking::rust_panic_with_hook::h527f6e576e1297bc
   7:     0x55ac6f8a9f59 - std::panicking::begin_panic_handler::{{closure}}::hbd4fa4e569c60071
   8:     0x55ac6f8a8a16 - std::sys_common::backtrace::__rust_end_short_backtrace::hb8d4f72b868865f5
   9:     0x55ac6f8a9c22 - rust_begin_unwind
  10:     0x55ac6f8858c3 - core::panicking::panic_fmt::hb12531409cdb4ed6
  11:     0x55ac6f885b3f - core::panicking::assert_failed_inner::he3c123340f62e981
  12:     0x55ac6f888666 - core::panicking::assert_failed::h3829da7a2ce7f5ec
  13:     0x55ac6f889839 - rust_out::main::_doctest_main_src_str_mod_rs_1144_0::hfc8d2ddc1b6481b5
  14:     0x55ac6f889666 - rust_out::main::hdc6ca12ef188ae7f
  15:     0x55ac6f8866c3 - core::ops::function::FnOnce::call_once::hdc0cadfae62e0a97
  16:     0x55ac6f8861e9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1c29b649872655be
  17:     0x55ac6f886239 - std::rt::lang_start::{{closure}}::h7bb98dbf9a7729bd
  18:     0x55ac6f8a4ab7 - std::rt::lang_start_internal::he0ea8d812d2478d4
  19:     0x55ac6f886217 - std::rt::lang_start::h06699a4618ecc88e
  20:     0x55ac6f889855 - main
  21:     0x7fd676b02d90 - <unknown>
  23:     0x55ac6f885df5 - _start
  24:                0x0 - <unknown>


---
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `None`,
 right: `Some(24)`', src/str/mod.rs:8:1
stack backtrace:
   0:     0x55dc1635a4a5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h328e207c0fd2205c
   1:     0x55dc16375fc8 - core::fmt::write::hf3b1e4fb936f95f6
   2:     0x55dc163588a1 - std::io::Write::write_fmt::hf1d0b0080eeddb6d
   3:     0x55dc1635a2b5 - std::sys_common::backtrace::print::h031dcf236c316efb
   4:     0x55dc1635bad4 - std::panicking::default_hook::{{closure}}::h9f518d39880907e1
   5:     0x55dc1635b7cb - std::panicking::default_hook::h689a8190a575275d
   6:     0x55dc1635bfa4 - std::panicking::rust_panic_with_hook::h527f6e576e1297bc
   7:     0x55dc1635be99 - std::panicking::begin_panic_handler::{{closure}}::hbd4fa4e569c60071
   8:     0x55dc1635a956 - std::sys_common::backtrace::__rust_end_short_backtrace::hb8d4f72b868865f5
   9:     0x55dc1635bb62 - rust_begin_unwind
  10:     0x55dc163378c3 - core::panicking::panic_fmt::hb12531409cdb4ed6
  11:     0x55dc16337b3f - core::panicking::assert_failed_inner::he3c123340f62e981
  12:     0x55dc1633a686 - core::panicking::assert_failed::h3829da7a2ce7f5ec
  13:     0x55dc1633b779 - rust_out::main::_doctest_main_src_str_mod_rs_1192_0::hd8070e055e5e7acb
  14:     0x55dc1633b5a6 - rust_out::main::hdc6ca12ef188ae7f
  15:     0x55dc16338783 - core::ops::function::FnOnce::call_once::hdc0cadfae62e0a97
  16:     0x55dc163382a9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1c29b649872655be
  17:     0x55dc163382f9 - std::rt::lang_start::{{closure}}::h7bb98dbf9a7729bd
  18:     0x55dc163569f7 - std::rt::lang_start_internal::he0ea8d812d2478d4
  19:     0x55dc163382d7 - std::rt::lang_start::h06699a4618ecc88e
  21:     0x7fcc75635d90 - <unknown>
  22:     0x7fcc75635e40 - __libc_start_main
  23:     0x55dc16337df5 - _start
  24:                0x0 - <unknown>
---
    src/str/mod.rs - str::str::rfind (line 1192)

test result: FAILED. 4072 passed; 2 failed; 37 ignored; 0 measured; 0 filtered out; finished in 47.60s

error: doctest failed, to rerun pass `-p core --doc`

@lcnr lcnr removed the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Apr 11, 2023
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 11, 2023
Fix typos in compiler

I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory.

Refs rust-lang#110150
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 11, 2023
Fix typos in librustdoc, tools and config files

I used [`typos`](https://github.com/crate-ci/typos) to fix all typos, minus the ones present in rust-lang#110153 and in rust-lang#110154.

Refs rust-lang#110150
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 11, 2023
Fix typos in librustdoc, tools and config files

I used [`typos`](https://github.com/crate-ci/typos) to fix all typos, minus the ones present in rust-lang#110153 and in rust-lang#110154.

Refs rust-lang#110150
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 11, 2023
Fix typos in compiler

I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory.

Refs rust-lang#110150
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 12, 2023
Fix typos in librustdoc, tools and config files

I used [`typos`](https://github.com/crate-ci/typos) to fix all typos, minus the ones present in rust-lang#110153 and in rust-lang#110154.

Refs rust-lang#110150
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Apr 12, 2023
Fix typos in compiler

I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory.

Refs rust-lang#110150
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 12, 2023
Fix typos in compiler

I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory.

Refs rust-lang#110150
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 14, 2023
Fix typos in library

I ran [`typos -w library`](https://github.com/crate-ci/typos) to fix typos in the `library` directory.

Refs rust-lang#110150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-style Relevant to the style team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants