rust/src/librustc_typeck
bors e42247f949 Auto merge of #56219 - arielb1:never-coerce-box, r=nikomatsakis
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
2018-12-20 03:41:00 +00:00
..
check Auto merge of #56219 - arielb1:never-coerce-box, r=nikomatsakis 2018-12-20 03:41:00 +00:00
coherence fix stupid bug 2018-12-14 19:14:22 +02:00
outlives Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
variance Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
astconv.rs fix trait objects with a Self-having projection va 2018-12-16 00:00:46 +02:00
Cargo.toml Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
check_unused.rs Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
collect.rs rustc: Don't ICE on usage of two new target features 2018-12-17 08:47:03 -08:00
constrained_type_params.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
diagnostics.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
impl_wf_check.rs Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
lib.rs fix review comments, round 2 2018-12-17 01:59:32 +02:00
namespace.rs Implement existential types 2018-07-18 10:53:08 +02:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
structured_errors.rs call span_suggestion with applicability 2018-08-25 23:28:26 -05:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.