-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
resolve: fix error title regarding private constructors #65250
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
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 |
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
|
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
19a0c7a
to
7140c02
Compare
Fixed. |
Thanks! |
📌 Commit 9d11bda has been approved by |
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