-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
cleanup our region error API #110220
cleanup our region error API #110220
Conversation
- require `TypeErrCtxt` to always result in an error - move `resolve_regions_and_report_errors` to the `ObligationCtxt` - merge `process_registered_region_obligations` into `resolve_regions`
Some changes occurred in engine.rs, potentially modifying the public API of |
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.
r=me
@@ -1763,7 +1763,9 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { | |||
|
|||
// constrain inference variables a bit more to nested obligations from normalize so | |||
// we can have more helpful errors. | |||
ocx.select_where_possible(); | |||
// | |||
// we intentionally errors from normalization here. |
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.
// we intentionally errors from normalization here. | |
// we intentionally drop errors from normalization here, | |
// since the normalization is just done to make the types better. |
if let Some(_) = self.infcx.tcx.sess.has_errors_or_delayed_span_bugs() { | ||
// ok, emitted an error. | ||
} else { | ||
self.infcx |
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.
This might create a problem if we create an error then cancel it, but I guess we can just wait until the ICE is filed :)
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.
yeah, imo that should not happen. Once you start using the err_ctxt()
you should only cancel if we already emit an error somewhere else.
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.
I think this caused rust-lang/rust-clippy#10645 🙈
@bors r=compiler-errors rollup |
cleanup our region error API - require `TypeErrCtxt` to always result in an error, closing rust-lang#108810 - move `resolve_regions_and_report_errors` to the `ObligationCtxt` - call `process_registered_region_obligations` in `resolve_regions` - move `resolve_regions` into the `outlives` submodule - add `#[must_use]` to functions returning lists of errors r? types
cleanup our region error API - require `TypeErrCtxt` to always result in an error, closing rust-lang#108810 - move `resolve_regions_and_report_errors` to the `ObligationCtxt` - call `process_registered_region_obligations` in `resolve_regions` - move `resolve_regions` into the `outlives` submodule - add `#[must_use]` to functions returning lists of errors r? types
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110072 (Stabilize IsTerminal) - rust-lang#110195 (Erase lifetimes above `ty::INNERMOST` when probing ambiguous types) - rust-lang#110218 (Remove `ToRegionVid`) - rust-lang#110220 (cleanup our region error API) - rust-lang#110234 (Fix btree `CursorMut::insert_after` check) - rust-lang#110262 (Update unwind_safe.rs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
TypeErrCtxt
to always result in an error, closing creating aTypeErrCtxt
should only be possible if we emit an error #108810resolve_regions_and_report_errors
to theObligationCtxt
process_registered_region_obligations
inresolve_regions
resolve_regions
into theoutlives
submodule#[must_use]
to functions returning lists of errorsr? types