aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix build for Diagnostic type changePhil Ellison2019-08-251-7/+4
|
* Cast SyntaxNodePtr to AstPtr directlyPhil Ellison2019-08-251-14/+3
|
* Remove reliance on expr orderingPhil Ellison2019-08-251-10/+4
|
* cargo formatPhil Ellison2019-08-251-13/+12
|
* Check type rather than just name in ok-wrapping diagnostic. Add test for ↵Phil Ellison2019-08-252-8/+40
| | | | handling generic functions (which currently fails)
* Mock std String and Result types in tests for ok-wrapping diagnosticPhil Ellison2019-08-251-2/+0
|
* Add type_mismatches to InferenceResult and use this in ok-wrapping code fixPhil Ellison2019-08-253-8/+27
|
* Initial implementation of Ok-wrappingPhil Ellison2019-08-253-3/+86
|
* rename struct -> record, pos -> tupleAleksey Kladov2019-08-236-45/+45
|
* Improve/fix type bound loweringFlorian Diebold2019-08-222-4/+35
|
* Handle impl/dyn Trait in method resolutionFlorian Diebold2019-08-223-32/+79
| | | | | | | | | | | | | 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-226-41/+339
| | | | | | | - 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-222-0/+37
| | | | closes #1709
* remove ast::*Kind from hirAleksey Kladov2019-08-196-83/+86
|
* implement initial type inference for index expressionsAleksey Kladov2019-08-173-1/+33
|
* normalize ordering opsAleksey Kladov2019-08-172-26/+36
|
* Introduce separate hir::BinaryOpAleksey Kladov2019-08-173-69/+96
| | | | | 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-152-1/+3
| |
* | switch from volatile to untracked readAleksey Kladov2019-08-152-22/+41
|/
* 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-122-4/+18
|
* Normalize associated types during inferenceFlorian Diebold2019-08-123-9/+25
|
* Lower fully qualified associated type pathsFlorian Diebold2019-08-123-23/+117
| | | | I.e. `<T as Trait>::Foo`.
* Add representations of associated typesFlorian Diebold2019-08-123-0/+113
| | | | | | | | | | | | 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
|
* Use Source in Diagnostic and implementEvgenii P2019-08-121-23/+15
|
* implement while let desugaringAleksey Kladov2019-08-073-14/+47
|
* refactor if-let loweringAleksey Kladov2019-08-071-19/+25
| | | | mainly to get rid of unwraps
* refactor if loweringAleksey Kladov2019-08-071-17/+14
|
* Merge #1634bors[bot]2019-08-042-2/+47
|\ | | | | | | | | | | | | | | | | | | 1634: Implement .await completion for futures r=flodiebold a=eupn Closes #1263 with completion for `.await` syntax for types that are implementing `std::future::Future` trait. r? @flodiebold Co-authored-by: Evgenii P <[email protected]>
| * rustfmtEvgenii P2019-08-041-3/+1
| |
| * Idiomatic returnEvgenii P2019-08-041-1/+1
| |
| * Employ early return pattern moreEvgenii P2019-08-041-10/+8
| |
| * source_binder.rs: fix order of importsEvgenii P2019-08-041-9/+10
| |
| * Use std::future::Future trait from stdlibEvgenii P2019-08-031-21/+36
| |
| * do fixup: remove unused importEvgenii P2019-08-021-1/+1
| |
| * Relax trait solving more for completionEvgenii P2019-08-021-7/+1
| |
| * Use future lang item instead of hardcoded std::future::FutureEvgenii P2019-08-021-31/+10
| |
| * rustfmtEvgenii P2019-08-022-13/+22
| |
| * Implement completion for the .await syntaxEvgenii P2019-08-022-1/+52
| |
* | Resolve out of line modules inside inline module with attribute pathAlexander Andreev2019-08-033-28/+70
|/ | | | | Fixed #1510 Fixed #1529
* Merge #1604bors[bot]2019-07-291-11/+15
|\ | | | | | | | | | | | | | | 1604: Fix failing type interference for floating point literal r=matklad a=theotherphil Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1592 Co-authored-by: Phil Ellison <[email protected]>
| * Move assist test, add literal type inference testPhil Ellison2019-07-291-11/+15
| |
* | Fixed request changes.Alexander Andreev2019-07-291-9/+19
| |
* | Added resolve modules inside inline moduleAlexander Andreev2019-07-292-54/+147
|/ | | | #1510
* show local variable types in completionEkaterina Babshukova2019-07-231-0/+8
|
* Merge #1570bors[bot]2019-07-211-4/+2
|\ | | | | | | | | | | | | | | 1570: switch to upstream rowan's API r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>