aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Merge #3147bors[bot]2020-02-141-0/+32
|\ | | | | | | | | | | | | | | 3147: Check that impl self type matches up with expected self type in path mode r=matklad a=flodiebold Fixes #3144. Co-authored-by: Florian Diebold <[email protected]>
| * Check that impl self type matches up with expected self type in path modeFlorian Diebold2020-02-141-0/+32
| | | | | | | | Fixes #3144.
* | Make Self implement the trait inside trait default methodsFlorian Diebold2020-02-141-0/+48
|/
* Don't let unknown match arms fall back to !Florian Diebold2020-02-111-0/+17
|
* Add two more testsFlorian Diebold2020-02-071-0/+51
|
* Don't print implicit type args from impl TraitFlorian Diebold2020-02-071-11/+11
|
* Deal better with implicit type parameters and argument listsFlorian Diebold2020-02-071-0/+108
|
* Clean up RPIT a bitFlorian Diebold2020-02-071-13/+11
|
* Fix APIT some moreFlorian Diebold2020-02-071-23/+28
|
* Change Ty::Param to contain param IDFlorian Diebold2020-02-072-3/+2
|
* WIP use params for APITFlorian Diebold2020-02-071-0/+53
|
* Fix assoc type selectionFlorian Diebold2020-02-071-3/+3
|
* Fix another testFlorian Diebold2020-02-071-2/+2
|
* Fix enum constructorsFlorian Diebold2020-02-072-5/+5
|
* Fix printing of function typesFlorian Diebold2020-02-076-69/+69
|
* Lower impl trait to variables, move away from using placeholders where they ↵Florian Diebold2020-02-071-1/+1
| | | | don't belong
* wip implement lowering modeFlorian Diebold2020-02-071-20/+8
|
* Standard formatting for array typesAleksey Kladov2020-01-284-88/+88
|
* Ignore failing impl Trait testsFlorian Diebold2020-01-271-0/+2
|
* Fix inference for shift operatorsFlorian Diebold2020-01-171-0/+21
| | | | Fixes #2602.
* Use dummy value for line! and column! macroEdwin Cheng2020-01-141-2/+2
|
* Fix various names, e.g. Iterator not resolving in core preludeFlorian Diebold2020-01-111-0/+54
| | | | | | | | | | | | | Basically, `Iterator` is re-exported via several steps, which happened to not be resolved yet when we got to the prelude import, but since the name resolved to the reexport from `core::iter` (just to no actual items), we gave up trying to resolve it further. Maybe part of the problem is that we can have `PartialResolvedImport::Unresolved` or `PartialResolvedImport::Indeterminate` with `None` in all namespaces, and handle them differently. Fixes #2683.
* Add test for macro expansion in various expressionsFlorian Diebold2020-01-101-0/+81
|
* Expand PAREN_EXPR as expressionEdwin Cheng2020-01-101-0/+17
|
* Fix #2705Florian Diebold2020-01-031-0/+17
| | | | | | | | The `-` turned into a `+` during a refactoring. The original issue was caused by `Read` resolving wrongly to a trait without type parameters instead of a struct with one parameter; this only fixes the crash, not the wrong resolution.
* Resolve traits in infer using lang item infrastructureEmil Lauridsen2019-12-292-0/+6
|
* Don't add non-impl/trait containers to scopeAleksey Kladov2019-12-292-1/+38
|
* 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
| |
* | Introduce our own Chalk TypeFamily, instead of using ChalkIrFlorian Diebold2019-12-221-2/+2
|/ | | | | | It's not very different, except we can directly use Salsa IDs instead of casting them. This means we need to refactor the handling of errors to get rid of UNKNOWN_TRAIT though.
* Rudimentary name resolution for local itemsAleksey Kladov2019-12-221-6/+6
|
* Recursive collect macros in impl itemsEdwin Cheng2019-12-201-0/+23
|
* Merge #2623bors[bot]2019-12-201-0/+19
|\ | | | | | | | | | | | | | | | | | | 2623: Add support macros in impl blocks r=matklad a=edwin0cheng This PR add support for macros in impl blocks, which reuse `Expander` for macro expansion. see also: #2459 Co-authored-by: Edwin Cheng <[email protected]>
| * Add support macros in impl blocksEdwin Cheng2019-12-201-0/+19
| |
* | Coerce closures to fn pointersFlorian Diebold2019-12-202-5/+44
| | | | | | | | 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-202-0/+86
|/ | | | Fixes #2547.
* 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
|
* 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.
* Add testsEdwin Cheng2019-12-061-0/+29
|
* 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.
* Implement derive(Copy, Clone) properly (well, kind of)Florian Diebold2019-12-051-0/+51
|
* Split up ty tests a bitFlorian Diebold2019-12-036-0/+4876
|
* Move TyAleksey Kladov2019-11-272-0/+615