-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Replace ItemCtxt::report_placeholder_type_error
match with a call to TyCtxt::def_descr
#143234
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
Conversation
This comment has been minimized.
This comment has been minimized.
help: you might have meant to open the body of the closure, instead of enclosing the closure in a block | ||
| | ||
LL - fn main() { | b : [str; _] | } | ||
LL + fn main() | b : [str; _] | { } |
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.
also lmao this diagnostic is funnily wrong
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.
It's funnily wrong but has to do with the recovery for { |x| }
which is apparently a ruby style closure
845aa63
to
3d59877
Compare
This comment has been minimized.
This comment has been minimized.
Please squash the third commit into the first. There's no reason we need to have a separate commit just to add a test, especially if it's not demonstrating the behavior before the fix (which this one doesn't really need). |
3d59877
to
af86816
Compare
Done. |
This comment has been minimized.
This comment has been minimized.
af86816
to
068c8db
Compare
This comment has been minimized.
This comment has been minimized.
… to `TyCtxt::def_descr`
068c8db
to
74fda50
Compare
Didn't think about |
@bors r=oli-obk rollup |
Rollup of 8 pull requests Successful merges: - #143125 (Disable f16 on Aarch64 without neon for llvm < 20.1.1) - #143156 (inherit `#[align]` from trait method prototypes) - #143178 (rustdoc default faviocon) - #143234 (Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr`) - #143245 (mbe: Add tests and restructure metavariable expressions) - #143257 (Upgrade dependencies in run-make-support) - #143263 (linkify CodeSuggestion in doc comments) - #143264 (fix: Emit suggestion filename if primary diagnostic span is dummy) Failed merges: - #143251 (bootstrap: add build.tidy-extra-checks option) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143234 - GuillaumeGomez:ice-143128, r=oli-obk Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr` Fixes #143128. We could likely use `tcx.def_descr` in more places (and therefore remove more `descr` methods). If it's something that we want to do, I can send a follow-up. r? `@oli-obk`
…r=oli-obk Remove `ItemKind::descr` method Follow-up of rust-lang#143234. After this PR is merged, it will remain two `descr` methods: * `hir::GenericArg::descr` * `hir::AssocItemConstraintKind::descr` For both these enums, I don't think there is the right equivalent in `hir::DefKind` so unless I missed something, we can't remove these two methods because we can't convert these enums into `hir::DefKind`. r? `@oli-obk`
Rollup merge of #143279 - GuillaumeGomez:rm-itemkind-descr, r=oli-obk Remove `ItemKind::descr` method Follow-up of #143234. After this PR is merged, it will remain two `descr` methods: * `hir::GenericArg::descr` * `hir::AssocItemConstraintKind::descr` For both these enums, I don't think there is the right equivalent in `hir::DefKind` so unless I missed something, we can't remove these two methods because we can't convert these enums into `hir::DefKind`. r? `@oli-obk`
Fixes #143128.
We could likely use
tcx.def_descr
in more places (and therefore remove moredescr
methods). If it's something that we want to do, I can send a follow-up.r? @oli-obk