aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
Commit message (Collapse)AuthorAgeFilesLines
* Simplify ADT fieldsAleksey Kladov2019-11-241-11/+5
|
* Hide data from public APIAleksey Kladov2019-11-221-2/+2
|
* Move const&static date to hir_defAleksey Kladov2019-11-221-2/+2
|
* Move FunctionData to hir_defAleksey Kladov2019-11-221-3/+3
|
* Remove old hir::generics moduleAleksey Kladov2019-11-211-16/+17
|
* Move resolver to hir_defAleksey Kladov2019-11-211-1/+1
|
* DecoupleAleksey Kladov2019-11-211-3/+4
|
* DecoupleAleksey Kladov2019-11-211-8/+8
|
* Decouple ResolverAleksey Kladov2019-11-211-13/+18
|
* Add HasResolver traitAleksey Kladov2019-11-201-1/+1
|
* Remove hir/adt.rsAleksey Kladov2019-11-201-2/+1
|
* Allow non-path default type parametersAleksey Kladov2019-11-201-3/+1
|
* Reduce duplication between uncertain floats & intsAleksey Kladov2019-11-131-7/+7
|
* Move definition of exprs to hir_defAleksey Kladov2019-11-121-5/+33
|
* Minor refactoringAleksey Kladov2019-11-121-3/+3
|
* Unfork struct and union idsAleksey Kladov2019-11-091-2/+2
|
* Move Namespace enum closer to usageAleksey Kladov2019-11-041-2/+13
|
* Remove last traces of nameres from hirAleksey Kladov2019-11-031-3/+2
|
* move struct & enum data to hir_defAleksey Kladov2019-10-311-4/+4
|
* move builtin types to hir_defAleksey Kladov2019-10-311-5/+11
|
* remove forward pointer for type_refAleksey Kladov2019-10-301-2/+4
|
* remove forward pointer to PathAleksey Kladov2019-10-301-1/+2
|
* make_mut_sliceShotaro Yamada2019-10-141-4/+2
|
* import make_mut_arc_sliceShotaro Yamada2019-10-141-1/+2
|
* `.collect()` directly into `Arc<[T]>`Shotaro Yamada2019-10-141-18/+14
|
* Avoid cloning `Arc<[T]>` into a vec if possibleShotaro Yamada2019-10-141-4/+3
|
* Support inferring `Self` type in enum definitionsice10002019-10-081-0/+1
| | | | Signed-off-by: ice1000 <[email protected]>
* Add SubstsBuilderFlorian Diebold2019-09-261-7/+13
| | | | + further refactoring.
* Resolve trait associated itemsFlorian Diebold2019-09-251-1/+1
| | | | E.g. `Default::default` or `<Foo as Default>::default`.
* Handle associated type shorthand (`T::Item`)Florian Diebold2019-09-221-9/+88
| | | | | | | | | | | | 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...
* Remove assoc type selection code for now to fix crashesFlorian Diebold2019-09-171-19/+4
|
* Small review improvementsFlorian Diebold2019-09-171-5/+3
|
* Refactor some moreFlorian Diebold2019-09-171-10/+24
| | | | | | 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 associated item resolution moreFlorian Diebold2019-09-171-53/+66
| | | | | When resolving an associated item in value namespace, use the `Ty` lowering code for the segments before the last instead of replicating it.
* Resolve assoc types on type parametersFlorian Diebold2019-09-171-21/+58
| | | | | | E.g. `fn foo<T: Iterator>() -> T::Item`. It seems that rustc does this only for type parameters and only based on their bounds, so we also only consider traits from bounds.
* Support bare `Trait` without dynFlorian Diebold2019-09-141-2/+1
|
* Specify desirable namespace when calling resolveAleksey Kladov2019-09-131-55/+53
| | | | That way, we are able to get rid of a number of unreachable statements
* rename AdtDef -> AdtAleksey Kladov2019-09-121-13/+11
|
* generalize impl_froms to nested enumsAleksey Kladov2019-09-121-19/+9
|
* make various enums "inherit" from AdtDefAleksey Kladov2019-09-121-29/+29
|
* start cleaning up the resolutionAleksey Kladov2019-09-121-1/+1
| | | | | | | 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.
* cleanup hir db importsAleksey Kladov2019-09-081-2/+3
|
* Lower bounds on trait definition, and resolve assoc types from super traitsFlorian Diebold2019-09-071-12/+15
|
* Make type walking infrastructure a bit nicerFlorian Diebold2019-09-031-0/+1
| | | | | If/when we switch to using Chalk's Ty, we'll need to replace this by its `Fold` trait, but I didn't want to import the whole thing just yet.
* Add support for associated type bindings (`where Trait<Type = X>`)Florian Diebold2019-09-031-28/+57
|
* Add `impl Trait` and `dyn Trait` typesFlorian Diebold2019-08-221-11/+54
| | | | | | | - 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
* Normalize associated types during inferenceFlorian Diebold2019-08-121-5/+0
|
* Lower fully qualified associated type pathsFlorian Diebold2019-08-121-15/+73
| | | | I.e. `<T as Trait>::Foo`.
* Some renamings for clarityFlorian Diebold2019-07-141-2/+5
|
* Start handling environment in trait resolutionFlorian Diebold2019-07-081-0/+12
| | | | | I.e. if we are inside a function with some where clauses, we assume these where clauses hold.