rust-analyzer/crates/ra_hir/src
bors[bot] 3d8a0982a1 Merge #866
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 <villem.penttinen@gmail.com>
2019-02-22 19:58:22 +00:00
..
code_model_impl Handle impl generics in method calls 2019-02-16 23:06:41 +01:00
expr Fix some typos 2019-02-12 15:02:57 +01:00
nameres remove ignored macro tests 2019-02-19 20:06:53 +03:00
ty Merge #866 2019-02-22 19:58:22 +00:00
adt.rs reformat the world 2019-02-08 14:49:43 +03:00
code_model_api.rs Handle tuple structs / enum variants properly in type inference 2019-02-17 20:53:13 +01:00
code_model_impl.rs Migrate trait & type to new ids 2019-01-25 01:31:32 +03:00
db.rs Handle tuple structs / enum variants properly in type inference 2019-02-17 20:53:13 +01:00
docs.rs Make doc comments optional 2019-01-26 10:35:23 -05:00
expr.rs Handle generic args for method calls 2019-02-16 23:06:41 +01:00
generics.rs Fix handling of generics in tuple variants and refactor a bit 2019-02-20 22:48:55 +01:00
ids.rs Handle impl generics in method calls 2019-02-16 23:06:41 +01:00
impl_block.rs Change resolve_path to return the fully resolved path or PerNs::none 2019-02-22 10:15:23 +02:00
lib.rs remove query_definitions 2019-02-11 17:44:54 +03:00
macros.rs make token trees eq 2019-02-12 20:57:13 +03:00
marks.rs Import the prelude 2019-02-13 20:10:09 +01:00
mock.rs Make edition handling a bit nicer and allow specifying edition in crate_graph macro 2019-02-13 20:31:47 +01:00
module_tree.rs remove useless hash 2019-02-11 19:09:53 +03:00
name.rs Fixup tests 2019-01-14 19:30:21 +01:00
nameres.rs Make nameres::ResolvePathResult private and refactor 2019-02-22 00:11:21 +02:00
path.rs Make GenericArgs::from_ast pub(crate) 2019-02-17 14:55:04 +01:00
resolve.rs Change resolve_path to return the fully resolved path or PerNs::none 2019-02-22 10:15:23 +02:00
source_binder.rs reformat the world 2019-02-08 14:49:43 +03:00
ty.rs Merge #866 2019-02-22 19:58:22 +00:00
type_ref.rs reformat the world 2019-02-08 14:49:43 +03:00