aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests/coercion.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rework find_super_trait_path to protect against cyclesFlorian Diebold2020-02-221-0/+38
|
* Add &dyn Trait -> &dyn SuperTrait coercion, and fix &T -> &dyn TraitFlorian Diebold2020-02-221-14/+26
|
* Implement dyn Trait unsizing as wellFlorian Diebold2020-02-221-1/+7
|
* Implement unsize coercion using proper trait solvingFlorian Diebold2020-02-221-0/+82
|
* Fix coercion of &T to itselfFlorian Diebold2020-02-161-0/+22
| | | | | The autoderef coercion logic did not handle matching placeholders. This led to some type mismatches.
* Fix printing of function typesFlorian Diebold2020-02-071-13/+13
|
* Standard formatting for array typesAleksey Kladov2020-01-281-48/+48
|
* Coerce closures to fn pointersFlorian Diebold2019-12-201-0/+39
| | | | E.g. `let x: fn(A) -> B = |x| { y };`
* Fix coercion of last expression in function bodyFlorian Diebold2019-12-201-0/+16
|
* Handle closure return typesFlorian Diebold2019-12-201-0/+31
| | | | Fixes #2547.
* Fix coercion from &Foo to an inference variable in a referenceFlorian Diebold2019-12-081-0/+37
| | | | We didn't try to unify within the reference, but we should.
* Don't unify within a referenceFlorian Diebold2019-12-061-0/+36
| | | | | | | If we are expecting a `&Foo` and get a `&something`, when checking the `something`, we are *expecting* a `Foo`, but we shouldn't try to unify whatever we get with that expectation, because it could actually be a `&Foo`, and `&&Foo` coerces to `&Foo`. So this fixes quite a few false type mismatches.
* Move TyAleksey Kladov2019-11-271-0/+369