aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests/traits.rs
Commit message (Collapse)AuthorAgeFilesLines
* Resolve traits in infer using lang item infrastructureEmil Lauridsen2019-12-291-0/+5
|
* Merge #2661bors[bot]2019-12-241-0/+57
|\ | | | | | | | | | | | | | | | | | | | | | | 2661: Implement infer await from async function r=flodiebold a=edwin0cheng This PR is my attempt for trying to add support for infer `.await` expression from an `async` function, by desugaring its return type to `Impl Future<Output=RetType>`. Note that I don't know it is supposed to desugaring it in that phase, if it is not suitable in current design, just feel free to reject it :) r=@flodiebold Co-authored-by: Edwin Cheng <[email protected]>
| * Implement infer await from async funcEdwin Cheng2019-12-241-0/+57
| |
* | Filter out error predicates in type bounds as wellFlorian Diebold2019-12-221-0/+17
|/
* Coerce closures to fn pointersFlorian Diebold2019-12-201-5/+5
| | | | E.g. `let x: fn(A) -> B = |x| { y };`
* Add std::ops::Index support for inferingEdwin Cheng2019-12-191-0/+32
|
* Add test markFlorian Diebold2019-12-151-2/+6
|
* Handle impl Trait more correctlyFlorian Diebold2019-12-151-0/+31
| | | | | | | When calling a function, argument-position impl Trait is transparent; same for return-position impl Trait when inside the function. So in these cases, we need to represent that type not by `Ty::Opaque`, but by a type variable that can be unified with whatever flows into there.
* Add test for unifying impl TraitFlorian Diebold2019-12-151-1/+27
|
* Correctly infer - and ! using std::ops::{Neg,Not}Emil Lauridsen2019-12-131-0/+64
|
* Split up ty tests a bitFlorian Diebold2019-12-031-0/+1424