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

Spelling #110392

Closed
wants to merge 285 commits into from
Closed

Spelling #110392

wants to merge 285 commits into from

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Apr 16, 2023

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at https://github.com/jsoref/rust/actions/runs/4712066890#summary-12779316921

The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust/actions/runs/4712067124#summary-12779317247

Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
@fee1-dead
Copy link
Member

This PR is pretty big.. Would it be easy to split these changes into smaller PRs?

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:8e5e7e5ab8b370d6c329ec480221332ada57f0ab)
Download action repository 'rust-lang/simpleinfra@master' (SHA:75291a2cdf0dd5ba60860701274f9500703102da)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  CI_JOB_NAME: mingw-check-tidy
---
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml): started
  Building wheel for reuse (pyproject.toml): finished with status 'done'
  Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=180119 sha256=9fa76c45f3193f307e02ea67d1a48cfe7ef2b854a074b766938a88e046bc7887
  Stored in directory: /tmp/pip-ephem-wheel-cache-rb6hhi72/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.6.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
---
Successfully built 8d3b8053a08e
Successfully tagged rust-ci:latest
Built container sha256:8d3b8053a08e7a2064b223cf26cd44f65561528b4a49fd6c6da87fec1a737891
Uploading finished image to https://ci-caches.rust-lang.org/docker/eee721fc1ad06e35509f22d2087fb4acdb0a4d378bec3a191179769e2503f17c7f8f4292d7013976df3a24502e822c590708d80a62f327ca4849564995e4deb7
upload failed: - to s3://rust-lang-ci-sccache2/docker/eee721fc1ad06e35509f22d2087fb4acdb0a4d378bec3a191179769e2503f17c7f8f4292d7013976df3a24502e822c590708d80a62f327ca4849564995e4deb7 Unable to locate credentials
[CI_JOB_NAME=mingw-check-tidy]
[CI_JOB_NAME=mingw-check-tidy]
---
   Compiling cargo_metadata v0.15.3
   Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
    Finished release [optimized] target(s) in 13.67s
fmt check
Diff in /checkout/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs at line 1:
 use crate::errors::{
-    AmbiguousReturn, AmbiguousImpl, AnnotationRequired, InferenceBadError, NeedTypeInfoInGenerator,
+    AmbiguousImpl, AmbiguousReturn, AnnotationRequired, InferenceBadError, NeedTypeInfoInGenerator,
     SourceKindMultiSuggestion, SourceKindSubdiag,
 };
 use crate::infer::error_reporting::TypeErrCtxt;
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs" "/checkout/compiler/rustc_infer/src/infer/error_reporting/suggest.rs" "/checkout/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs" "/checkout/compiler/rustc_infer/src/infer/free_regions.rs" "/checkout/compiler/rustc_infer/src/infer/lub.rs" "/checkout/compiler/rustc_infer/src/infer/equate.rs" "/checkout/compiler/rustc_infer/src/infer/lattice.rs" "/checkout/compiler/rustc_infer/src/infer/error_reporting/mod.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.

@Noratrieb
Copy link
Member

You should also squash the commits afterward the splitting up (the best way to split it up is probably after specific areas (compiler, library, rustdoc etc). With the tests you should be careful and maybe avoid them for now to not accidentally make the test wrong. Changes to rustc_codegen_gcc, rustc_codegen_cranelift, clippy, cargo and rustfmt should be filed on their respective repositories instead of here.

@compiler-errors
Copy link
Member

There are several problems with this PR:

  1. First of all, it's somewhat disruptive to the github history and to reviewability that this is broken into one commit per word. Even if we were to review this, it's much easier to break this into smaller PRs centered around fixing certain areas of the codebase (e.g. per crate in compiler/, fixing typos in rustdoc, libstd docs, etc.).
  2. Secondly, this touches crates that are "in limbo" and other sources that really shouldn't be modified in tree unless for a good reason. For example, rustc-apfloat shouldn't be modified. Nor is it a good idea to touch tools that have their own repos, like src/tools/rustfmt.
  3. Third, it's not very valuable IMO to be "fixing" UI tests. Those are test data, it doesn't matter if they have small typos in them. From a quick glance, a lot of the fixes are to those...

Per #58619 and precedent for large "typo fixes" PRs, I'm going to close this. Thanks for your contribution to rustc.

@fee1-dead
Copy link
Member

fee1-dead commented Apr 16, 2023

it's not very valuable IMO to be "fixing" UI tests.

I assume that typo fixing was automated using a tool, and I'd have no problem with typos being fixed for ui tests. I totally agree that it should be split into different subfolders only (compiler/*, library/*)

On another note, we can have bors squash the commits before merging so having each commit for each word is not a really big problem (except for being hard to navigate as a reviewer because I would have to click on each commit to see the changes).

@jsoref
Copy link
Contributor Author

jsoref commented Apr 16, 2023

  • I split off the components that were listed as subtrees (Spelling miri#2843, Spelling rust-analyzer#14577, Spelling rustfmt#5753 (comment), Spelling rust-clippy#10649)

    • I tried to peel off rustfmt and friends, apparently when I did my last round of rebasing/fixups some slipped in.
  • I'm happy to split things in whichever means people like -- I just need input

  • I'm happy to squash, but only once people are ok w/ the changes -- if I had squashed eagerly, it'd have been unusable (I rely on unsquashed changes to enable me to drop / fix up items, or while rebasing to deal w/ conflicts)

  • sorry for not commenting sooner, I'm still working on annotating the PR. I can either flush that or discard it.

  • I'm quite happy to let bors do the squashing

  • I assume that typo fixing was automated using a tool -- sort of: an automated tool identifies possible issues. A human (that's me) manually applies changes and I try to make sure that I apply them to everything (while also trying not to apply them to things I've decided to exclude)

Copy link
Contributor Author

@jsoref jsoref left a comment

Choose a reason for hiding this comment

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

I won't finish the annotations, but here's what I had when I stopped...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some projects don't like changing changelogs. Happy to drop.

// poision "2*precision - 1" to "precision - 1". The exponent need to be
// poisson "2*precision - 1" to "precision - 1". The exponent need to be
Copy link
Contributor Author

Choose a reason for hiding this comment

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

?

Alternatively you can download a pre built version from [Github Actions]. It is listed in the artifacts section
Alternatively you can download a pre built version from [GitHub Actions]. It is listed in the artifacts section
Copy link
Contributor Author

Choose a reason for hiding this comment

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

brand

// The following is a work around that replaces `pub mod llvm;` and that fixes issue 53912.
// The following is a workaround that replaces `pub mod llvm;` and that fixes issue 53912.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the noun form is a single word.

/// A way to temporarily opt out of opt in copy. This will *never* be accepted.
/// A way to temporarily opt out of opt-in copy. This will *never* be accepted.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nouns compound with either - or without a space, verb phrases don't compound. Here, opt out is a verb phrase, whereas opt-in is the noun.

// get all where BoundPredicates here, because they are used in to cases below
// get all where BoundPredicates here, because they are used in two cases below
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In general, I do not check 2-letter words. Here, in to tripped a check and it appears that to was the wrong homonym.

// can't add `#[rustc_clean]` etc without opting in to this feature
// can't add `#[rustc_clean]` etc without opting into this feature
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 should note that in to/into changes to be quite controversial. I'm happy to drop them (or anything else).

Comment on lines -344 to +345
infer_prlf_must_oultive_with_sup = ...must outlive the lifetime `{$sup_symbol}` defined here
infer_prlf_must_oultive_without_sup = ...must outlive the lifetime defined here
infer_prlf_must_outlive_with_sup = ...must outlive the lifetime `{$sup_symbol}` defined here
infer_prlf_must_outlive_without_sup = ...must outlive the lifetime defined here
Copy link
Contributor Author

Choose a reason for hiding this comment

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

-oultive
+outlive

infer_oc_intristic_correct_type = intrinsic has wrong type
infer_oc_intrinsic_correct_type = intrinsic has wrong type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

-intristic
+intrinsic

if let ty::ConstKind::Bound(debrujin, b) = result_value.kind() {
if let ty::ConstKind::Bound(debruijn, b) = result_value.kind() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two tokens were adjacent in the word list and one appeared dominant.

@workingjubilee
Copy link
Member

Sorry, we cannot actually rely on bors to do squashing.

@jsoref
Copy link
Contributor Author

jsoref commented Apr 16, 2023

I'm quite happy to do the squashing, can someone suggest a limited subset of directories they'd like me to start w/?

I'm fully capable of doing splits and squashes, but I do need direction.

If there's a specific set of directories I should absolutely ignore, I can take that now and drop changes to them.

@Noratrieb
Copy link
Member

rustc_apfloat needs to be ignored. I'd recommend splitting as I described above. You can r? Nilstrieb on the compiler PR.

@fee1-dead
Copy link
Member

Sorry, we cannot actually rely on bors to do squashing.

Yeah.. sorry for forgetting about that.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 17, 2023
…iddle

Spelling librustdoc

This is split from rust-lang#110392

There's one change to src/tools/rustdoc-gui/tester.js which feels like a reasonable thing to piggy-back here.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 18, 2023
Spelling compiler

This is per rust-lang#110392 (comment)

I'm going to delay performing a squash because I really don't expect people to be perfectly happy w/ my changes, I really am a human and I really do make mistakes.

r? Nilstrieb

I'm going to be flying this evening, but I should be able to squash / respond to reviews w/in a day or two.

I tried to be careful about dropping changes to `tests`, afaict only two files had changes that were likely related to the changes for a given commit (this is where not having eagerly squashed should have given me an advantage), but, that said, picking things apart can be error prone.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2023
…lbertlarsan68

Spelling src bootstrap

The various src/* items seem slightly disparate, so I'm doing src/* individually.

split from rust-lang#110392
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2023
…rsan68

Spelling src ci

The various src/* items seem slightly disparate, so I'm doing src/* individually.

split from rust-lang#110392
@Mark-Simulacrum Mark-Simulacrum mentioned this pull request Apr 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2023
…lacrum

Spelling src etc

The various src/* items seem slightly disparate, so I'm doing src/* individually.

split from rust-lang#110392
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Apr 22, 2023
Spelling src etc

The various src/* items seem slightly disparate, so I'm doing src/* individually.

split from rust-lang/rust#110392
jyn514 added a commit to jyn514/rust that referenced this pull request Apr 26, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 26, 2023
Spelling library

Split per rust-lang#110392

I can squash once people are happy w/ the changes. It's really uncommon for large sets of changes to be perfectly acceptable w/o at least some changes.

I probably won't have time to respond until tomorrow or the next day
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request Jul 18, 2023
Spelling library

Split per rust-lang/rust#110392

I can squash once people are happy w/ the changes. It's really uncommon for large sets of changes to be perfectly acceptable w/o at least some changes.

I probably won't have time to respond until tomorrow or the next day
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure 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-release Relevant to the release subteam, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants