aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
Commit message (Collapse)AuthorAgeFilesLines
* Resolve textual scoped macros inside itemuHOOCCOOHu2019-09-081-0/+35
|
* cleanup hir db importsAleksey Kladov2019-09-084-7/+11
|
* Fix crash for super trait cyclesFlorian Diebold2019-09-071-0/+21
|
* Fix Chalk environmentsFlorian Diebold2019-09-072-3/+4
| | | | | The clauses need to be wrapped in `FromEnv` clauses for elaboration (i.e. things like inferring `T: Clone` from `T: Copy`) to work correctly.
* Use traits from where clauses for method resolutionFlorian Diebold2019-09-073-12/+32
| | | | | E.g. if we have `T: some::Trait`, we can call methods from that trait without it needing to be in scope.
* Lower `Fn(X, Y) -> Z` pathsFlorian Diebold2019-09-071-8/+8
|
* Lower bounds on trait definition, and resolve assoc types from super traitsFlorian Diebold2019-09-075-23/+26
|
* Add some more testsFlorian Diebold2019-09-071-0/+205
|
* Make type walking infrastructure a bit nicerFlorian Diebold2019-09-036-19/+9
| | | | | If/when we switch to using Chalk's Ty, we'll need to replace this by its `Fold` trait, but I didn't want to import the whole thing just yet.
* Properly format `impl Trait<Type = Foo>` typesFlorian Diebold2019-09-031-4/+4
| | | | | | It's a bit complicated because we basically have to 'undo' the desugaring, and the result is very dependent on the specifics of the desugaring and will probably produce weird results otherwise.
* Add support for associated type bindings (`where Trait<Type = X>`)Florian Diebold2019-09-034-46/+135
|
* Add test for assoc type bindingsFlorian Diebold2019-09-031-0/+65
|
* Correctly build BodySourceMap for macro-expanded expressionsAleksey Kladov2019-09-031-8/+25
|
* clearer ignoreAleksey Kladov2019-09-031-1/+1
|
* remove needless refsAleksey Kladov2019-09-031-2/+2
|
* use recrod terminology for hir::PatAleksey Kladov2019-09-031-2/+2
|
* fix hir for new block syntaxAleksey Kladov2019-09-021-1/+1
|
* Add an expr_source method analogous to the source methods in the code modelFlorian Diebold2019-09-021-2/+2
| | | | ... and use that instead of exposing the source map.
* :arrow_up: instaAleksey Kladov2019-08-291-1167/+1265
|
* Small fixesKirill Bulatov2019-08-261-12/+9
|
* Remove redundant testsKirill Bulatov2019-08-261-63/+5
|
* Make infer_block not unify; add back calculate_least_upper_boundFlorian Diebold2019-08-262-30/+66
|
* An attempt to add the coercion logic for NeverKirill Bulatov2019-08-262-51/+98
|
* Properly coerce never typesKirill Bulatov2019-08-262-51/+46
|
* Remove extra inference testKirill Bulatov2019-08-262-25/+0
|
* Fix never in if expressionsKirill Bulatov2019-08-262-4/+51
|
* Add test marksKirill Bulatov2019-08-262-1/+11
|
* Fix match type inference for Never match armsKirill Bulatov2019-08-262-6/+32
|
* TestsKirill Bulatov2019-08-261-0/+104
|
* Add type_mismatches to InferenceResult and use this in ok-wrapping code fixPhil Ellison2019-08-251-1/+18
|
* rename struct -> record, pos -> tupleAleksey Kladov2019-08-231-6/+6
|
* Improve/fix type bound loweringFlorian Diebold2019-08-221-0/+33
|
* Handle impl/dyn Trait in method resolutionFlorian Diebold2019-08-222-32/+66
| | | | | | | | | | | | | When we have one of these, the `Trait` doesn't need to be in scope to call its methods. So we need to consider this when looking for method candidates. (Actually I think the same is true when we have a bound `T: some::Trait`, but we don't handle that yet). At the same time, since Chalk doesn't handle these types yet, add a small hack to skip Chalk in method resolution and just consider `impl Trait: Trait` always true. This is enough to e.g. get completions for `impl Trait`, but since we don't do any unification we won't infer the return type of e.g. `impl Into<i64>::into()`.
* Add `impl Trait` and `dyn Trait` typesFlorian Diebold2019-08-223-12/+177
| | | | | | | - refactor bounds handling in the AST a bit - add HIR for bounds - add `Ty::Dyn` and `Ty::Opaque` variants and lower `dyn Trait` / `impl Trait` syntax to them
* Don't add `?` bounds as real boundsAleksey Kladov2019-08-221-0/+29
| | | | closes #1709
* implement initial type inference for index expressionsAleksey Kladov2019-08-172-0/+20
|
* normalize ordering opsAleksey Kladov2019-08-171-16/+16
|
* Introduce separate hir::BinaryOpAleksey Kladov2019-08-172-67/+21
| | | | | Unlike ast::BinOp, it has significantly more structure to it, so it's easier to, say, handle all assignment-like operations in the same way.
* Merge #1691bors[bot]2019-08-161-0/+9
|\ | | | | | | | | | | | | | | 1691: Show inherent and trait impls of structs and enums r=viorina a=viorina Co-authored-by: Ekaterina Babshukova <[email protected]>
| * show inherent and trait impls of structs and enumsEkaterina Babshukova2019-08-161-0/+9
| |
* | implement durabilityAleksey Kladov2019-08-151-1/+1
| |
* | switch from volatile to untracked readAleksey Kladov2019-08-151-17/+37
|/
* Handle placeholder assoc types when Chalk produces themFlorian Diebold2019-08-122-3/+67
|
* Normalize assoc types in more placesFlorian Diebold2019-08-122-12/+27
|
* Improve debug logging a bitFlorian Diebold2019-08-121-4/+4
|
* Normalize associated types during inferenceFlorian Diebold2019-08-123-9/+25
|
* Lower fully qualified associated type pathsFlorian Diebold2019-08-122-22/+80
| | | | I.e. `<T as Trait>::Foo`.
* Add representations of associated typesFlorian Diebold2019-08-121-0/+23
| | | | | | | | | | | | This adds three different representations, copied from the Chalk model: - `Ty::Projection` is an associated type projection written somewhere in the code, like `<Foo as Trait>::Bar`. - `Ty::UnselectedProjection` is similar, but we don't know the trait yet (`Foo::Bar`). - The above representations are normalized to their actual types during type inference. When that isn't possible, for example for `T::Item` inside an `fn foo<T: Iterator>`, the type is normalized to an application type with `TypeCtor::AssociatedType`.
* Add another test for assoc type resolutionFlorian Diebold2019-08-121-6/+46
|
* implement while let desugaringAleksey Kladov2019-08-071-0/+20
|