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

Typo on error E0369 description text #68008

Closed
FSciammarella opened this issue Jan 8, 2020 · 2 comments · Fixed by #68023
Closed

Typo on error E0369 description text #68008

FSciammarella opened this issue Jan 8, 2020 · 2 comments · Fixed by #68023
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@FSciammarella
Copy link
Contributor

Got this error message when trying to compile a crate using rustc 1.42.0-nightly (8597644 2020-01-07).

error[E0369]: cannot substract `systemstat::ByteSize` from `systemstat::ByteSize`
  --> /home/felipe-wsl/.cargo/registry/src/github.51.al-1ecc6299db9ec823/hegemon-0.1.0/src/providers/memory.rs:37:44         |
37 |                         Some((memory.total - memory.free).as_usize() as f64)
   |                               ------------ ^ ----------- systemstat::ByteSize
   |                               |
   |                               systemstat::ByteSize
   |
   = note: an implementation of `std::ops::Sub` might be missing for `systemstat::ByteSize`

The text reads substract instead of subtract.

@jonas-schievink jonas-schievink added A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2020
@varkor
Copy link
Member

varkor commented Jan 8, 2020

@FSciammarella: if you want to contribute a fix, you would just need to modify these three lines:

format!("cannot substract `{}` from `{}`", rhs_ty, lhs_ty),

a - a; //~ ERROR cannot substract `A` from `A`

error[E0369]: cannot substract `A` from `A`

@varkor varkor added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Jan 8, 2020
@FSciammarella
Copy link
Contributor Author

@varkor thanks for your response, I submitted a PR #68023 to fix this.

bors added a commit that referenced this issue Jan 9, 2020
Rollup of 12 pull requests

Successful merges:

 - #67630 (Treat extern statics just like statics in the "const pointer to static" representation)
 - #67747 (Explain that associated types and consts can't be accessed directly on the trait's path)
 - #67884 (Fix incremental builds of core by allowing unused attribute.)
 - #67966 (Use matches macro in libcore and libstd)
 - #67979 (Move `intravisit` => `rustc_hir` + misc cleanup)
 - #67986 (Display more informative ICE)
 - #67990 (slice patterns: harden match-based borrowck tests)
 - #68005 (Improve E0184 explanation)
 - #68009 (Spell check librustc_error_codes)
 - #68023 (Fix issue #68008)
 - #68024 (Remove `-Z continue-parse-after-error`)
 - #68026 (Small improvements in lexical_region_resolve)

Failed merges:

r? @ghost
@bors bors closed this as completed in d2922e5 Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants