Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix another crash from wrong binders | Florian Diebold | 2020-04-17 | 1 | -20/+49 |
| | | | | | | | Basically, if we had something like `dyn Trait<T>` (where `T` is a type parameter) in an impl we lowered that to `dyn Trait<^0.0>`, when it should be `dyn Trait<^1.0>` because the `dyn` introduces a new binder. With one type parameter, that's just wrong, with two, it'll lead to crashes. | ||||
*-. | Merge #3964 #3965 #3967 | bors[bot] | 2020-04-15 | 1 | -8/+34 |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3964: Nicer Chalk debug logs r=matklad a=flodiebold I'm looking at a lot of Chalk debug logs at the moment, so here's a few changes to make them slightly nicer... 3965: Implement inline associated type bounds r=matklad a=flodiebold Like `Iterator<Item: SomeTrait>`. This is an unstable feature, but it's used in the standard library e.g. in the definition of Flatten, so we can't get away with not implementing it :) (This is cherry-picked from my recursive solver branch, where it works better, but I did manage to write a test that works with the current Chalk solver as well...) 3967: Handle `Self::Type` in trait definitions when referring to own associated type r=matklad a=flodiebold It was implemented for other generic parameters for the trait, but not for `Self`. (Last one off my recursive solver branch :smile: ) Co-authored-by: Florian Diebold <flodiebold@gmail.com> | ||||
| | * | Handle `Self::Type` in trait definitions when referring to own associated type | Florian Diebold | 2020-04-13 | 1 | -2/+12 |
| |/ |/| | | | | | It was implemented for other generic parameters for the trait, but not for `Self`. | ||||
| * | Implement inline associated type bounds | Florian Diebold | 2020-04-13 | 1 | -6/+22 |
|/ | | | | | | | Like `Iterator<Item: SomeTrait>`. This is an unstable feature, but it's used in the standard library e.g. in the definition of Flatten, so we can't get away with not implementing it :) | ||||
* | Upgrade Chalk again | Florian Diebold | 2020-04-05 | 1 | -13/+15 |
| | | | | | | | The big change here is counting binders, not variables (https://github.com/rust-lang/chalk/pull/360). We have to adapt to the same scheme for our `Ty::Bound`. It's mostly fine though, even makes some things more clear. | ||||
* | Use `dyn Trait` for working with databse | Aleksey Kladov | 2020-03-16 | 1 | -112/+108 |
| | | | | | | | It improves compile time in `--release` mode quite a bit, it doesn't really slow things down and, conceptually, it seems closer to what we want the physical architecture to look like (we don't want to monomorphise EVERYTHING in a single leaf crate). | ||||
* | Resolve `Self::AssocTy` in impls | Florian Diebold | 2020-03-06 | 1 | -36/+50 |
| | | | | | | | | | | To do this we need to carry around the original resolution a bit, because `Self` gets resolved to the actual type immediately, but you're not allowed to write the equivalent type in a projection. (I tried just comparing the projection base type with the impl self type, but that seemed too dirty.) This is basically how rustc does it as well. Fixes #3249. | ||||
* | Rework find_super_trait_path to protect against cycles | Florian Diebold | 2020-02-22 | 1 | -1/+2 |
| | |||||
* | Fix wrong handling of bare `dyn Trait` exposed by canonicalizer fix | Florian Diebold | 2020-02-22 | 1 | -1/+3 |
| | | | | | The self type in the `dyn Trait` trait ref should always be ^0, but we didn't put that in there in the bare case. | ||||
* | Run cargo +nightly fix --clippy -Z unstable-options | Kirill Bulatov | 2020-02-18 | 1 | -12/+10 |
| | |||||
* | use 'if let' instead of match on kind in lower.rs | adamrk | 2020-02-17 | 1 | -6/+4 |
| | |||||
* | replace uses of VariantData::is_unit with VariantData::kind | adamrk | 2020-02-16 | 1 | -4/+7 |
| | |||||
* | Make Self implement the trait inside trait default methods | Florian Diebold | 2020-02-14 | 1 | -4/+28 |
| | |||||
* | Rename Ty::Param => Ty::Placeholder | Florian Diebold | 2020-02-14 | 1 | -4/+4 |
| | | | | This aligns more with Chalk. | ||||
* | Fix some TODOs | Florian Diebold | 2020-02-07 | 1 | -3/+7 |
| | |||||
* | Deal better with implicit type parameters and argument lists | Florian Diebold | 2020-02-07 | 1 | -20/+21 |
| | |||||
* | Formatting | Florian Diebold | 2020-02-07 | 1 | -2/+6 |
| | |||||
* | Fix compilation of other crates | Florian Diebold | 2020-02-07 | 1 | -2/+2 |
| | |||||
* | Use variables in predicates as well | Florian Diebold | 2020-02-07 | 1 | -32/+41 |
| | |||||
* | Comment fixes / todos | Florian Diebold | 2020-02-07 | 1 | -6/+5 |
| | |||||
* | Fix APIT some more | Florian Diebold | 2020-02-07 | 1 | -3/+2 |
| | |||||
* | Fix APIT | Florian Diebold | 2020-02-07 | 1 | -0/+2 |
| | |||||
* | Change Ty::Param to contain param ID | Florian Diebold | 2020-02-07 | 1 | -49/+59 |
| | |||||
* | WIP use params for APIT | Florian Diebold | 2020-02-07 | 1 | -0/+10 |
| | |||||
* | Fix assoc type selection | Florian Diebold | 2020-02-07 | 1 | -29/+40 |
| | |||||
* | First stab at desugaring bounds for APIT | Florian Diebold | 2020-02-07 | 1 | -3/+26 |
| | |||||
* | Fix crash | Florian Diebold | 2020-02-07 | 1 | -4/+7 |
| | |||||
* | Fix enum constructors | Florian Diebold | 2020-02-07 | 1 | -6/+4 |
| | |||||
* | Lower impl trait to variables, move away from using placeholders where they ↵ | Florian Diebold | 2020-02-07 | 1 | -122/+141 |
| | | | | don't belong | ||||
* | wip lower impl trait to type args | Florian Diebold | 2020-02-07 | 1 | -0/+1 |
| | |||||
* | wip implement lowering mode | Florian Diebold | 2020-02-07 | 1 | -6/+26 |
| | |||||
* | Add impl trait lowering mode | Florian Diebold | 2020-02-07 | 1 | -18/+80 |
| | |||||
* | Introduce TyLoweringContext | Florian Diebold | 2020-02-07 | 1 | -122/+110 |
| | |||||
* | Fix #2705 | Florian Diebold | 2020-01-03 | 1 | -1/+1 |
| | | | | | | | | The `-` turned into a `+` during a refactoring. The original issue was caused by `Read` resolving wrongly to a trait without type parameters instead of a struct with one parameter; this only fixes the crash, not the wrong resolution. | ||||
* | Support for nested ADT | Aleksey Kladov | 2019-12-20 | 1 | -2/+2 |
| | |||||
* | Forbid <T>::foo syntax in mod paths | Aleksey Kladov | 2019-12-18 | 1 | -3/+3 |
| | |||||
* | Use different types for path with and without generics | Aleksey Kladov | 2019-12-14 | 1 | -36/+34 |
| | |||||
* | Move enum&union to new loc | Aleksey Kladov | 2019-12-12 | 1 | -4/+5 |
| | |||||
* | Move structs to new loc | Aleksey Kladov | 2019-12-12 | 1 | -1/+1 |
| | |||||
* | Refactor parameter count tracking | Aleksey Kladov | 2019-12-07 | 1 | -7/+6 |
| | |||||
* | Remove idx and parent generics from generics | Aleksey Kladov | 2019-12-07 | 1 | -16/+19 |
| | | | | | This makes `hir_def::GenericParams` flatter. The logic for re-numbering the params is moved to hir instead. | ||||
* | Add cycle recovery for type aliases | Florian Diebold | 2019-11-30 | 1 | -0/+5 |
| | |||||
* | Add cycle recovery for generic predicates | Florian Diebold | 2019-11-30 | 1 | -0/+9 |
| | |||||
* | Handle cycles in impl types better | Florian Diebold | 2019-11-30 | 1 | -14/+21 |
| | | | | | | - impl Trait<Self> for S is allowed - impl Trait for S<Self> is an invalid cycle, but we can add cycle recovery for it in Salsa now | ||||
* | Minimize API | Aleksey Kladov | 2019-11-27 | 1 | -8/+3 |
| | |||||
* | Memoize impl resolutions | Aleksey Kladov | 2019-11-27 | 1 | -12/+23 |
| | |||||
* | Move Ty | Aleksey Kladov | 2019-11-27 | 1 | -0/+753 |