aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/source_analyzer.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge #8945bors[bot]2021-05-231-3/+6
|\ | | | | | | | | | | | | | | | | | | | | | | 8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold Also makes call info show the correct types for generic methods. ![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png) ![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png) Co-authored-by: Florian Diebold <[email protected]>
| * Get rid of field_type againFlorian Diebold2021-05-231-2/+5
| |
| * Record method call substs and use them in call infoFlorian Diebold2021-05-231-1/+1
| |
* | Correctly resolve crate name in use paths when import shadows itselfLukas Tobias Wirth2021-05-231-1/+10
|/
* Reuse database in LowerCtxJonas Schievink2021-05-061-3/+2
|
* Don't store call-site text offsets in hygiene infoJonas Schievink2021-05-061-3/+4
|
* hir_ty: Expand macros at type positioncynecx2021-04-171-3/+6
|
* Remove Ty::substs{_mut}Florian Diebold2021-04-071-3/+3
| | | | | | Almost all uses actually only care about ADT substs, so it's better to be explicit. The methods were a bad abstraction anyway since they already didn't include the inner types of e.g. `TyKind::Ref` anymore.
* infer: remove `record_pat_field_resolutions` fieldJonas Schievink2021-04-061-4/+8
| | | | | Same as https://github.com/rust-analyzer/rust-analyzer/pull/8376, this can be computed from other data
* infer: remove `record_field_resolutions` fieldJonas Schievink2021-04-061-6/+9
| | | | | It stores no useful data, since we can derive all fields from `variant_resolutions`
* Add Interner parameter to Binders::substituteFlorian Diebold2021-04-051-2/+2
|
* Binders::subst -> substituteFlorian Diebold2021-04-051-1/+1
|
* Resolve associated types with type anchorsLukas Wirth2021-04-011-10/+19
|
* Resolve associated typesLukas Wirth2021-04-011-2/+17
|
* avoid converting types into themselves via .into() (clippy::useless-conversion)Matthias Krüger2021-03-171-1/+1
| | | | example: let x: String = String::from("hello world").into();
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-2/+2
|
* Simplify source maps for fieldsAleksey Kladov2021-03-151-21/+3
|
* Goto definition works for `S { a: }` caseAleksey Kladov2021-03-151-3/+22
| | | | | | | | | | | | | What happens here is that we lower `: ` to a missing expression, and then correctly record that the corresponding field expression resolves to a specific field. Where we fail is in the mapping of syntax to this missing expression. Doing it via `ast_field.expr()` fails, as that expression is `None`. Instead, we go in the opposite direcition and ask each lowered field about its source. This works, but has wrong complexity `O(N)` and, really, the implementation is just too complex. We need some better management of data here.
* Remove useless code_model indirectionAleksey Kladov2021-03-081-3/+2
|
* Inline TypeCtor into TyLukas Wirth2021-02-281-11/+5
|
* Wrap `BuiltinType` in code modelJonas Schievink2021-02-111-4/+5
|
* Resolve TupleStructPat in SourceAnalyzer::resolve_pathLukas Wirth2021-02-101-6/+11
|
* Prefer ValueNS when resolving hir path for PathExpressionsLukas Wirth2021-01-291-14/+31
|
* Classify function calls as functions when shadowed by typesLukas Wirth2021-01-281-2/+6
|
* Add ConstParams to the HIRLukas Wirth2021-01-011-0/+1
|
* Align code_model name with ungrammarAleksey Kladov2020-12-201-9/+9
|
* Improve code structureAleksey Kladov2020-12-111-1/+1
| | | | | Make sure that there's only one entry point, analyze, remove awkard analyzer2 name
* Rename record_field_pat to record_pat_fieldPavan Kumar Sunkara2020-09-101-2/+2
|
* Don't expose hir::Path out of hirAleksey Kladov2020-08-151-3/+3
| | | | | | | | | | | | | | Conjecture: it's impossible to use hir::Path *correctly* from an IDE. I am not entirely sure about this, and we might need to add it back at some point, but I have to arguments that convince me that we probably won't: * `hir::Path` has to know about hygiene, which an IDE can't set up properly. * `hir::Path` lacks identity, but you actually have to know identity to resolve it correctly
* Rename ra_hir -> hirAleksey Kladov2020-08-131-0/+534