aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/resolve.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move CrateDefMap to hir_defAleksey Kladov2019-11-031-52/+56
|
* move builtin types to hir_defAleksey Kladov2019-10-311-2/+2
|
* push name down to hir_expandAleksey Kladov2019-10-301-1/+1
|
* remove forward pointer to PathAleksey Kladov2019-10-301-1/+1
|
* remove forward pointer for nameAleksey Kladov2019-10-301-9/+11
|
* introduce ra_hir_defAleksey Kladov2019-10-301-7/+10
|
* Address comments: fix docs, add completion test for `Self`.ice10002019-10-081-1/+1
|
* Support inferring `Self` type in enum definitionsice10002019-10-081-5/+27
| | | | Signed-off-by: ice1000 <[email protected]>
* Handle associated type shorthand (`T::Item`)Florian Diebold2019-09-221-0/+7
| | | | | | | | | | | | This is only allowed for generic parameters (including `Self` in traits), and special care needs to be taken to not run into cycles while resolving it, because we use the where clauses of the generic parameter to find candidates for the trait containing the associated type, but the where clauses may themselves contain instances of short-hand associated types. In some cases this is even fine, e.g. we might have `T: Trait<U::Item>, U: Iterator`. If there is a cycle, we'll currently panic, which isn't great, but better than overflowing the stack...
* account for impls generated by macrosAleksey Kladov2019-09-181-2/+2
|
* Refactor some moreFlorian Diebold2019-09-171-8/+8
| | | | | | Type-relative paths (`<T>::foo`) also need to work in type context, for example `<T>::Item` is legal. So rather than returning the type ref from the resolver function, just check it before.
* Refactor a bit to prepare for resolving trait assoc itemsFlorian Diebold2019-09-171-4/+4
|
* Move store TypeRef of type based path in PathKinduHOOCCOOHu2019-09-151-1/+1
|
* Support path starting with a typeuHOOCCOOHu2019-09-151-11/+17
|
* make PerNs non-genericAleksey Kladov2019-09-131-7/+3
|
* Specify desirable namespace when calling resolveAleksey Kladov2019-09-131-172/+233
| | | | That way, we are able to get rid of a number of unreachable statements
* rename AdtDef -> AdtAleksey Kladov2019-09-121-3/+3
|
* make various enums "inherit" from AdtDefAleksey Kladov2019-09-121-3/+3
|
* start cleaning up the resolutionAleksey Kladov2019-09-121-1/+37
| | | | | | | Nameres related types, like `PerNs<Resolution>`, can represent unreasonable situations, like a local in a type namespace. We should clean this up, by requiring that call-site specifies the kind of resolution it expects.
* Make macro scope a real name scopeuHOOCCOOHu2019-09-091-6/+8
| | | | Fix some details about module scoping
* Constify KnownName'sMuhammad Mominul Huque2019-07-071-5/+5
|
* Add trait obligations for where clauses when calling functions/methodsFlorian Diebold2019-07-061-0/+12
| | | | | E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x: Into<u32>`, etc.
* Some clippy fixes for 1.36Jeremy Kolb2019-07-041-2/+2
|
* allow rustfmt to reorder importsAleksey Kladov2019-07-041-5/+8
| | | | | | This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway
* use single version of either in hirAleksey Kladov2019-06-101-2/+2
|
* remove some hacks from nameresolution for macrosAleksey Kladov2019-06-081-7/+10
|
* somewhat better nameAleksey Kladov2019-06-081-1/+5
|
* add a fixmeAleksey Kladov2019-06-081-2/+2
|
* Improve goto definition for MBEEdwin Cheng2019-06-011-3/+7
|
* rename code_model_api -> code_modelAleksey Kladov2019-05-231-1/+1
|
* simplifyAleksey Kladov2019-05-121-14/+3
|
* simplifyAleksey Kladov2019-05-121-1/+1
|
* Use traits from prelude for method resolutionFlorian Diebold2019-05-121-13/+12
|
* Chalk integrationFlorian Diebold2019-05-041-2/+1
| | | | | - add proper canonicalization logic - add conversions from/to Chalk IR
* Use correct FileId when expanding macros in expressionsAleksey Kladov2019-05-011-18/+6
|
* Introduced resolve_macro_call on resolverLenard Pratt2019-04-231-4/+28
| | | | | | changed to manual expansion fix for nested macros
* Added macro resolution and expansionLenard Pratt2019-04-221-1/+6
|
* New krate() method in Resolver.Marco Groppo2019-04-191-2/+8
| | | | Renamed Impl to ImplBlock.
* Initial support for lang items.Marco Groppo2019-04-191-1/+1
|
* make resolver privateAleksey Kladov2019-04-131-13/+5
|
* Clean up comments / use nicer Iterator methodsFlorian Diebold2019-03-251-1/+1
|
* Basics for trait method resolutionFlorian Diebold2019-03-251-1/+16
|
* replace todo with fixmeAleksey Kladov2019-03-231-2/+2
|
* rename ModuleId -> CrateModuleIdAleksey Kladov2019-03-171-4/+4
|
* remove ItemMapAleksey Kladov2019-03-171-15/+21
|
* Change resolve_path to return the fully resolved path or PerNs::noneVille Penttinen2019-02-221-13/+16
| | | | | | 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.
* Remove Const inference for now, refactor PathResultVille Penttinen2019-02-211-19/+59
|
* Implement basic support for Associated Methods and ConstantsVille Penttinen2019-02-211-6/+40
| | | | | | | 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.
* Complete names from preludeFlorian Diebold2019-02-131-3/+9
|
* Import the preludeFlorian Diebold2019-02-131-6/+6
|