aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Make EnumVariant a GenericDef and simplify some codeFlorian Diebold2019-07-061-0/+10
|
* Add trait obligations for where clauses when calling functions/methodsFlorian Diebold2019-07-061-6/+4
| | | | | E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x: Into<u32>`, etc.
* allow rustfmt to reorder importsAleksey Kladov2019-07-041-11/+10
| | | | | | 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
* rename XSignature -> XDataAleksey Kladov2019-06-181-8/+7
|
* Add basic infrastructure for assoc type projectionFlorian Diebold2019-06-151-1/+1
|
* somewhat better nameAleksey Kladov2019-06-081-2/+2
|
* add tests for primitive typesAleksey Kladov2019-05-301-2/+1
|
* add built-in types to scopesAleksey Kladov2019-05-301-16/+0
|
* add ModuleDef::BuiltInTypeAleksey Kladov2019-05-301-5/+31
|
* add union to code_modelAleksey Kladov2019-05-231-2/+8
|
* remove minor code duplicationAleksey Kladov2019-05-201-18/+14
|
* Use normal iteration instead of walk_mutEdwin Cheng2019-05-201-8/+5
|
* Add infer for generic default typeEdwin Cheng2019-05-191-13/+46
|
* Handle where clauses in trait solvingFlorian Diebold2019-05-111-8/+45
|
* Differentiate Tuple / FnPtr type constructors by cardinalityFlorian Diebold2019-05-041-2/+5
| | | | | This is necessary because Chalk (reasonably) expects each 'struct' to know how many type parameters it takes.
* Chalk integrationFlorian Diebold2019-05-041-18/+12
| | | | | - add proper canonicalization logic - add conversions from/to Chalk IR
* Extract generic_params method to a HasGenericParams traitFlorian Diebold2019-04-141-2/+2
|
* Some cleanupFlorian Diebold2019-04-141-2/+5
|
* More trait infrastructureFlorian Diebold2019-04-141-1/+8
| | | | | | | | | | - make it possible to get parent trait from method - add 'obligation' machinery for checking that a type implements a trait (and inferring facts about type variables from that) - handle type parameters of traits (to a certain degree) - improve the hacky implements check to cover enough cases to exercise the handling of traits with type parameters - basic canonicalization (will probably also be done by Chalk)
* Get substs for trait refs in impl blocksFlorian Diebold2019-04-141-25/+70
|
* replace todo with fixmeAleksey Kladov2019-03-231-3/+3
|
* Refactor primitive types into more orthogonal representationyanchith2019-03-221-4/+4
|
* TypeName => TypeCtorFlorian Diebold2019-03-211-18/+18
|
* Remove the old variants replaced by Ty::ApplyFlorian Diebold2019-03-211-20/+18
|
* Represent FnPtr and Tuple using SubstsFlorian Diebold2019-03-211-2/+2
|
* make Name::new privateAleksey Kladov2019-03-201-2/+2
|
* Remove FnSig from FnDef typeFlorian Diebold2019-03-161-6/+12
| | | | | It doesn't need to be in there since it's just information from the def. Another step towards aligning Ty with Chalk's representation.
* Refactor FnSig a bitFlorian Diebold2019-03-161-25/+45
|
* Replace Display by a pretty printing trait for TyFlorian Diebold2019-03-161-17/+6
| | | | | This allows removing the names from Adt and FnDef (and more later), as a first step towards aligning more with chalk's Ty :)
* Add static type inferenceVille Penttinen2019-02-251-4/+17
|
* Add const type inferenceVille Penttinen2019-02-251-5/+17
|
* Rename Type => TypeAliasFlorian Diebold2019-02-241-9/+9
|
* Implement support for type aliasesFlorian Diebold2019-02-241-9/+23
|
* Refactor associated method resolution a bit and make it work with genericsFlorian Diebold2019-02-231-26/+41
|
* Split ty.rs into several modulesFlorian Diebold2019-02-231-0/+318
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