trigger unsized coercions keyed on Sized bounds This PR causes unsized coercions to not be disabled by `$0: Unsize<dyn Object>` coercion obligations when we have an `$0: Sized` obligation somewhere. This should be mostly backwards-compatible, because in these cases not doing the unsize coercion should have caused the `$0: Sized` obligation to fail. Note that `X: Unsize<dyn Object>` obligations can't fail *as obligations* if `X: Sized` holds, so this still maintains some version of monotonicity (I think that an unsized coercion can't be converted to no coercion by unifying type variables). Fixes #49593 (unblocking never_type). r? @eddyb cc @nikomatsakis |
||
|---|---|---|
| .. | ||
| check | ||
| coherence | ||
| outlives | ||
| variance | ||
| astconv.rs | ||
| Cargo.toml | ||
| check_unused.rs | ||
| collect.rs | ||
| constrained_type_params.rs | ||
| diagnostics.rs | ||
| impl_wf_check.rs | ||
| lib.rs | ||
| namespace.rs | ||
| README.md | ||
| structured_errors.rs | ||
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.