-
Notifications
You must be signed in to change notification settings - Fork 13.4k
clean up E0308 explanation #69139
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
clean up E0308 explanation #69139
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
mismatch in the expected type that the compiler inferred for a variable's | ||
initializing expression, and the actual type explicitly assigned to the | ||
variable. | ||
Expected type didn't match the received type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected type didn't match the received type. | |
Expected type did not match the received type. |
09cd4af
to
6e49eb2
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Ping from triage: @GuillaumeGomez You need to bless tests :) |
6e49eb2
to
21d0b73
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@GuillaumeGomez Two tests (json-bom-plus-crlf.rs and json-bom-plus-crlf-multifile.rs) contain E0308 explanation as json, like: rust/src/test/ui/json-bom-plus-crlf.stderr Lines 1 to 17 in 823ff8c
So you should also update these stderrs. |
21d0b73
to
64460a1
Compare
@bors r+ rollup |
📌 Commit 64460a1 has been approved by |
…an-DPC clean up E0308 explanation r? @Dylan-DPC
…an-DPC clean up E0308 explanation r? @Dylan-DPC
…an-DPC clean up E0308 explanation r? @Dylan-DPC
Rollup of 10 pull requests Successful merges: - rust-lang#67749 (keyword docs for else and inkeyword docs for else and in.) - rust-lang#69139 (clean up E0308 explanation) - rust-lang#69189 (Erase regions in writeback) - rust-lang#69837 (Use smaller discriminants for generators) - rust-lang#69838 (Expansion-driven outline module parsing) - rust-lang#69839 (Miri error reform) - rust-lang#69899 (Make methods declared by `newtype_index` macro `const`) - rust-lang#69920 (Remove some imports to the rustc crate) - rust-lang#70075 (Fix repr pretty display) - rust-lang#70106 (Tidy: fix running rustfmt twice) Failed merges: - rust-lang#70051 (Allow `hir().find` to return `None`) - rust-lang#70074 (Expand: nix all fatal errors) r? @ghost
Improve E0308 error message wording Hi folks, I made [a post on Reddit](https://old.reddit.com/r/rust/comments/fmi11x/consider_linting_rusts_documentationerror_text/) about how (IMO) the docs/error messages can be a bit intimidating, one thing led to another, and I was encouraged to submit a Pull Request if I felt I could re-phrase the error message that I used as an example. So that's this Pull Request. Open to any feedback or style changes, and I understand this is subjective. (On another note: I am happy to see [this message was recently improved](rust-lang#69139) in `master`, so it's already better than it is in stable Rust 1.42.0.) Ideally the last sentence could be split into at least two: [sentence explaining the inferred type.] [Sentence explaining explicit type.] [Sentence that summarizes that "this is bad," and why.] But I'm not sure how to do so; I'm wary of writing something that turns out to be technically incorrect.
r? @Dylan-DPC