aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
Commit message (Collapse)AuthorAgeFilesLines
...
* | Replace Display by a pretty printing trait for TyFlorian Diebold2019-03-165-54/+126
| | | | | | | | | | This allows removing the names from Adt and FnDef (and more later), as a first step towards aligning more with chalk's Ty :)
* | derive Hash for ra_hir::ModuleDefpcpthm2019-03-141-1/+1
|/
* remove DefAleksey Kladov2019-03-122-6/+0
|
* Add support for goto definition and hover on SelfVille Penttinen2019-03-071-24/+25
| | | | This fixes #943
* Updateskjeremy2019-03-051-2/+2
|
* Use impl_froms!kjeremy2019-03-041-13/+3
|
* Make ExpOrPatId privatekjeremy2019-03-041-3/+6
|
* Remove commented out codeJeremy Kolb2019-03-041-9/+0
|
* Use ImplItems instead of just FunctionJeremy Kolb2019-03-041-34/+48
|
* Make goto definition/hover resolve constructorskjeremy2019-03-041-3/+40
|
* Inline type inference test snapshotsFlorian Diebold2019-03-0359-1504/+1096
|
* Represent unknown types as {unknown} instead of [unknown]Florian Diebold2019-03-0328-171/+171
| | | | Since the latter could actually be a real type...
* Add a bunch of tests for type inference involving traitsFlorian Diebold2019-03-0213-0/+403
| | | | None of them works correctly yet, of course.
* Merge #915bors[bot]2019-03-0210-112/+89
|\ | | | | | | | | | | | | | | | | | | | | 915: Bring BodySyntaxMapping in line with other source-map instances r=flodiebold a=matklad * rename to SourceMap * don't store the actual body inline, just return a pair r? @flodiebold Co-authored-by: Aleksey Kladov <[email protected]>
| * remove commentAleksey Kladov2019-03-021-1/+0
| |
| * remove second way to get the bodyAleksey Kladov2019-03-021-4/+0
| |
| * rename syntax_mapping as wellAleksey Kladov2019-03-021-1/+1
| |
| * align lower module query namesAleksey Kladov2019-03-026-21/+14
| |
| * rename scopesAleksey Kladov2019-03-024-9/+9
| |
| * rename to source_mapAleksey Kladov2019-03-022-17/+13
| |
| * dont store body inside source mapAleksey Kladov2019-03-024-60/+53
| |
| * rename syntax-mapping -> source-mapAleksey Kladov2019-03-025-24/+24
| |
* | A bit of cleanup in ty.rsFlorian Diebold2019-03-021-28/+1
|/
* Remove `TypeRef` from item opts which implement TypeAscriptionOwnerVille Penttinen2019-02-274-10/+10
|
* Use TypeAscriptionOwnerVille Penttinen2019-02-261-8/+5
| | | | | | This replaces places where we would use node + node.type_ref() with things that have an ascribed type, with using the TypeAscriptionOwner as the trait bound so we can simply pass the node.
* Merge #897bors[bot]2019-02-2511-20/+206
|\ | | | | | | | | | | | | | | | | | | 897: Add basic const/static type inference r=flodiebold a=vipentti This adds basic const/static type inference discussed in #887. Currently the inference does not work for const/static declared inside a block. In addition the inference does not work inside the bodies of const/static. Co-authored-by: Ville Penttinen <[email protected]>
| * Move ConstSignature creation to a single methodVille Penttinen2019-02-251-17/+13
| |
| * Add static type inferenceVille Penttinen2019-02-256-12/+54
| |
| * Add const type inferenceVille Penttinen2019-02-2511-20/+168
| |
* | rename type to type_alias in the AST as wellAleksey Kladov2019-02-254-6/+9
|/
* Rename Type => TypeAliasFlorian Diebold2019-02-249-40/+54
|
* Add test for recursive type aliasesFlorian Diebold2019-02-241-0/+14
|
* Implement support for type aliasesFlorian Diebold2019-02-248-11/+102
|
* introduce completion presentationAleksey Kladov2019-02-241-1/+1
| | | | | This module should remove completion rendering boilerplate from the "brains" of completion engine.
* Clean up imports a bitFlorian Diebold2019-02-242-6/+4
|
* Refactor associated method resolution a bit and make it work with genericsFlorian Diebold2019-02-234-64/+98
|
* Split ty.rs into several modulesFlorian Diebold2019-02-235-1450/+1500
| | | | | | | | | It was just getting too big. We now have: - ty: the `Ty` enum and helpers - ty::infer: actual type inference - ty::lower: lowering from HIR to `Ty` - ty::op: helpers for binary operations, currently
* Fix resolution of associated method calls across cratesFlorian Diebold2019-02-233-3/+53
| | | | | | I think it'll be better to make the path resolution the number of unresolved segments, not the first unresolved index; then this error could simply not have happened. But I'll do that separately.
* Merge #866bors[bot]2019-02-229-31/+410
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 866: Implement basic support for Associated Methods r=flodiebold a=vipentti This is my attempt at learning to understand how the type inference works by adding basic support for associated methods. Currently it does not resolve associated types or constants. The basic idea is that `Resolver::resolve_path` returns a new `PathResult` type, which has two variants, `FullyResolved` and `PartiallyResolved`, fully resolved matches the previous behavior, where as `PartiallyResolved` contains the `PerNs<Resolution` in addition to a `segment_index` which contains the index of the segment which we failed to resolve. This index can then be used to continue inference in `infer_path_expr` using the `Type` we managed to resolve. This changes some of the previous apis, so looking for feedback and suggestions. This should enable fixing #832 Co-authored-by: Ville Penttinen <[email protected]>
| * Change resolve_path to return the fully resolved path or PerNs::noneVille Penttinen2019-02-223-34/+36
| | | | | | | | | | | | This also adds new pub(crate) resolve_path_segments which returns the PathResult, which may or may not be fully resolved. PathResult is also now pub(crate) since it is an implementation detail.
| * Ignore failing test for nowVille Penttinen2019-02-211-0/+1
| |
| * Make nameres::ResolvePathResult private and refactorVille Penttinen2019-02-211-7/+7
| |
| * Remove Const inference for now, refactor PathResultVille Penttinen2019-02-214-77/+93
| |
| * Implement basic support for Associated Methods and ConstantsVille Penttinen2019-02-2110-48/+408
| | | | | | | | | | | | | | This is done in `infer_path_expr`. When `Resolver::resolve_path` returns `PartiallyResolved`, we use the returned `Resolution` together with the given `segment_index` to check if we can find something matching the segment at segment_index in the impls for that particular type.
* | Add an assert (and fix the other)Florian Diebold2019-02-211-1/+2
| |
* | Fix handling of generics in tuple variants and refactor a bitFlorian Diebold2019-02-205-41/+105
|/ | | | | | Also make them display a tiny bit nicer. Fixes #860.
* remove ignored macro testsAleksey Kladov2019-02-191-30/+0
| | | | | we need to significantly reengineer macros, so the tests as they exist are useless
* Merge #852bors[bot]2019-02-183-34/+40
|\ | | | | | | | | | | | | | | 852: Handle != r=flodiebold a=matklad r? @flodiebold Co-authored-by: Aleksey Kladov <[email protected]>
| * handle != operatorAleksey Kladov2019-02-183-34/+40
| |
* | Handle tuple structs / enum variants properly in type inferenceFlorian Diebold2019-02-175-37/+95
|/