Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Apply suggestions from code review | vsrs | 2020-06-18 | 1 | -28/+25 |
| | |||||
* | Add Type::walk method | vsrs | 2020-06-18 | 1 | -0/+52 |
| | |||||
* | Add `Go to Type Definition` hover action. | vsrs | 2020-06-18 | 1 | -3/+3 |
| | |||||
* | Clean up handling of int/float literal types | Florian Diebold | 2020-06-06 | 1 | -3/+3 |
| | | | | | | 'Unknown' int/float types actually never exist as such, they get replaced by type variables immediately. So the whole `Uncertain<IntTy>` thing was unnecessary and just led to a bunch of match branches that were never hit. | ||||
* | Implement return position impl trait / opaque type support | Florian Diebold | 2020-06-05 | 1 | -9/+89 |
| | | | | | | | | | | | | | This is working, but I'm not that happy with how the lowering works. We might need an additional representation between `TypeRef` and `Ty` where names are resolved and `impl Trait` bounds are separated out, but things like inference variables don't exist and `impl Trait` is always represented the same way. Also note that this doesn't implement correct handling of RPIT *inside* the function (which involves turning the `impl Trait`s into variables and creating obligations for them). That intermediate representation might help there as well. | ||||
* | Support raw_ref_op's raw reference operator | robojumper | 2020-05-28 | 1 | -2/+16 |
| | |||||
* | Use Chalk's built-in representation of function item types | Florian Diebold | 2020-05-22 | 1 | -0/+6 |
| | |||||
* | Use TypeCtorId as AdtId directly, and rename the type alias StructId -> AdtId | Florian Diebold | 2020-05-22 | 1 | -1/+1 |
| | |||||
* | Switch to new magic marks | Aleksey Kladov | 2020-05-20 | 1 | -1/+0 |
| | |||||
* | Allow calling dyn trait super trait methods without the super trait in scope | Florian Diebold | 2020-05-16 | 1 | -8/+6 |
| | | | | | This also removes some vestiges of the old impl trait support which I think aren't currently in use. | ||||
* | Adds a param_idx helper | Fedor Sakharov | 2020-05-14 | 1 | -0/+5 |
| | |||||
* | Handle coercing function types to function pointers in match | Florian Diebold | 2020-05-08 | 1 | -0/+6 |
| | | | | | | | | | | | | E.g. in ```rust match x { 1 => function1, 2 => function2, } ``` we need to try coercing both to pointers. Turns out this is a special case in rustc as well (see the link in the comment). | ||||
* | Use matches! | Florian Diebold | 2020-05-08 | 1 | -4/+1 |
| | |||||
* | Implement better handling of divergence | Florian Diebold | 2020-05-08 | 1 | -0/+7 |
| | | | | | | | | Divergence here means that for some reason, the end of a block will not be reached. We tried to model this just using the never type, but that doesn't work fully (e.g. in `let x = { loop {}; "foo" };` x should still have type `&str`); so this introduces a `diverges` flag that the type checker keeps track of, like rustc does. | ||||
* | Rename to associated_type_shorthand_candidates | Jonas Schievink | 2020-04-29 | 1 | -2/+2 |
| | |||||
* | Complete assoc. items on type parameters | Jonas Schievink | 2020-04-29 | 1 | -1/+2 |
| | |||||
* | For associated type shorthand (T::Item), use the substs from the where clause | Florian Diebold | 2020-04-26 | 1 | -0/+12 |
| | | | | | So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`. | ||||
* | Fix wrong substitution code | Florian Diebold | 2020-04-23 | 1 | -1/+1 |
| | | | | | | | We need to shift in when we're substituting inside a binder. This should fix #4053 (it doesn't fix the occasional overflow that also occurs on the Diesel codebase though). | ||||
* | Fix another crash from wrong binders | Florian Diebold | 2020-04-17 | 1 | -2/+2 |
| | | | | | | | 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. | ||||
* | fix false positive for enum with no variants | Josh Mcguigan | 2020-04-16 | 1 | -0/+10 |
| | |||||
* | missing match arms diagnostic | Josh Mcguigan | 2020-04-07 | 1 | -0/+1 |
| | |||||
* | Fix Chalk panic | Florian Diebold | 2020-04-06 | 1 | -1/+2 |
| | | | | | Fixes #3865. Basically I forgot to shift 'back' when we got `dyn Trait`s back from Chalk, so after going through Chalk a few times, the panic happened. | ||||
* | Check for eprintln on CI | Aleksey Kladov | 2020-04-06 | 1 | -0/+5 |
| | |||||
* | Upgrade Chalk again | Florian Diebold | 2020-04-05 | 1 | -30/+73 |
| | | | | | | | 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 | -17/+19 |
| | | | | | | | 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). | ||||
* | Normalize waiting queries names | Aleksey Kladov | 2020-03-06 | 1 | -2/+2 |
| | |||||
* | Fix #3373 | Florian Diebold | 2020-03-01 | 1 | -0/+4 |
| | | | | | | | Basically, we need to allow variables in the caller self type to unify with the impl's declared self type. That requires some more contortions in the variable handling. I'm looking forward to (hopefully) handling this in a cleaner way when we switch to Chalk's types and unification code. | ||||
* | Rework find_super_trait_path to protect against cycles | Florian Diebold | 2020-02-22 | 1 | -7/+10 |
| | |||||
* | Fix shift_bound_vars | Florian Diebold | 2020-02-22 | 1 | -3/+3 |
| | | | | It should only shift free vars (maybe the name isn't the best...) | ||||
* | Add &dyn Trait -> &dyn SuperTrait coercion, and fix &T -> &dyn Trait | Florian Diebold | 2020-02-22 | 1 | -0/+20 |
| | |||||
* | Implement dyn Trait unsizing as well | Florian Diebold | 2020-02-22 | 1 | -0/+11 |
| | |||||
* | More manual clippy fixes | Kirill Bulatov | 2020-02-18 | 1 | -3/+2 |
| | |||||
* | Run cargo +nightly fix --clippy -Z unstable-options | Kirill Bulatov | 2020-02-18 | 1 | -2/+2 |
| | |||||
* | Move hir_fmt code to display module | Florian Diebold | 2020-02-14 | 1 | -371/+4 |
| | |||||
* | Rename Ty::Param => Ty::Placeholder | Florian Diebold | 2020-02-14 | 1 | -5/+5 |
| | | | | This aligns more with Chalk. | ||||
* | Fix some TODOs | Florian Diebold | 2020-02-07 | 1 | -7/+10 |
| | |||||
* | Don't print implicit type args from impl Trait | Florian Diebold | 2020-02-07 | 1 | -3/+10 |
| | |||||
* | Formatting | Florian Diebold | 2020-02-07 | 1 | -1/+4 |
| | |||||
* | Fix compilation of other crates | Florian Diebold | 2020-02-07 | 1 | -2/+8 |
| | |||||
* | Use variables in predicates as well | Florian Diebold | 2020-02-07 | 1 | -24/+4 |
| | |||||
* | Comment fixes / todos | Florian Diebold | 2020-02-07 | 1 | -0/+2 |
| | |||||
* | Fix APIT some more | Florian Diebold | 2020-02-07 | 1 | -73/+80 |
| | |||||
* | Change Ty::Param to contain param ID | Florian Diebold | 2020-02-07 | 1 | -22/+27 |
| | |||||
* | Fix printing of function types | Florian Diebold | 2020-02-07 | 1 | -3/+4 |
| | |||||
* | Lower impl trait to variables, move away from using placeholders where they ↵ | Florian Diebold | 2020-02-07 | 1 | -2/+32 |
| | | | | don't belong | ||||
* | wip lower impl trait to type args | Florian Diebold | 2020-02-07 | 1 | -1/+1 |
| | |||||
* | Add impl trait lowering mode | Florian Diebold | 2020-02-07 | 1 | -1/+3 |
| | |||||
* | Introduce TyLoweringContext | Florian Diebold | 2020-02-07 | 1 | -1/+1 |
| | |||||
* | Standard formatting for array types | Aleksey Kladov | 2020-01-28 | 1 | -1/+1 |
| | |||||
* | Omit default parameters for reference types | Kirill Bulatov | 2020-01-22 | 1 | -1/+6 |
| |