aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests/coercion.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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