Uh oh!
There was an error while loading. Please reload this page.
resolve: fix error title regarding private constructors - #65250
Conversation
rust-highfive
commented
Oct 9, 2019
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
da-x
commented
Oct 9, 2019
Uh oh!
There was an error while loading. Please reload this page.
ping @rust-lang/wg-diagnostics on whether the new wording looks better on average or not, I'm not sure. Perhaps a flag parameter can be added to |
rust-highfive
commented
Oct 9, 2019
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 |
IMO, there are a handful of places where mentioning "constructor" would look good, namely when differentiating between the ADT itself and its constructor in the same message (type mismatch, "expected struct of type The only case I think needs fixing is which should probably look closer to |
petrochenkov
commented
Oct 11, 2019
So, I looked through the diff and it's indeed mostly a regression. So, I think, let's keep |
The constructor is private, not the type. Idea credit to @petrochenkov, discussed at rust-lang#65153
da-x
commented
Oct 11, 2019
Fixed. |
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Oct 11, 2019
Thanks! |
bors
commented
Oct 11, 2019
📌 Commit 9d11bda has been approved by |
petrochenkov
commented
Oct 11, 2019
Meta: it's undesirable to @mention people in commit messages, such commits will generate a lot of mail while going through CI. |
…nkov resolve: fix error title regarding private constructors One reason is that constructors can be private while their types can be public. Idea credit to @petrochenkov, discussed at rust-lang#65153
Rollup of 13 pull requests Successful merges: - #65039 (Document missing deny by default lints) - #65069 (Implement Clone::clone_from for VecDeque) - #65165 (Improve docs on some char boolean methods) - #65248 (Suggest `if let` on `let` refutable binding) - #65250 (resolve: fix error title regarding private constructors) - #65295 (Move diagnostics code out of the critical path) - #65320 (Report `CONST_ERR` lint in external macros) - #65327 (replace the hand-written binary search with the library one) - #65339 (do not reference LLVM for our concurrency memory model) - #65357 (syntax: simplify maybe_annotate_with_ascription) - #65358 (simplify maybe_stage_features) - #65359 (simplify integer_lit) - #65360 (mbe: reduce panictry! uses.) Failed merges: r? @ghost
One reason is that constructors can be private while their types can be
public.
Idea credit to @petrochenkov, discussed at #65153