Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move Ty | Aleksey Kladov | 2019-11-27 | 1 | -1110/+1 |
| | |||||
* | Remove TypableDef | Aleksey Kladov | 2019-11-27 | 1 | -1/+1 |
| | |||||
* | Crate -> CrateId | Aleksey Kladov | 2019-11-27 | 1 | -8/+5 |
| | |||||
* | Remove last traces of adt from Ty | Aleksey Kladov | 2019-11-26 | 1 | -3/+4 |
| | |||||
* | Remove ns-polymorphic type_for_def | Aleksey Kladov | 2019-11-26 | 1 | -2/+2 |
| | |||||
* | Cleanup imports | Aleksey Kladov | 2019-11-26 | 1 | -4/+6 |
| | |||||
* | Use TraitId in TraitRef | Aleksey Kladov | 2019-11-26 | 1 | -5/+8 |
| | |||||
* | Detangle ty from traits a bit | Aleksey Kladov | 2019-11-26 | 1 | -0/+1 |
| | |||||
* | Id-ify Ty::Adt | Aleksey Kladov | 2019-11-26 | 1 | -6/+6 |
| | |||||
* | Use TypeAliasId in Ty, pt 2 | Aleksey Kladov | 2019-11-25 | 1 | -17/+18 |
| | |||||
* | Use TypeAliasId in Ty, pt 1 | Aleksey Kladov | 2019-11-25 | 1 | -10/+16 |
| | |||||
* | More ids in Ty | Aleksey Kladov | 2019-11-25 | 1 | -5/+6 |
| | |||||
* | Fix hir for ast::UnionDef | Aleksey Kladov | 2019-11-25 | 1 | -1/+1 |
| | |||||
* | Use ids for Callable | Aleksey Kladov | 2019-11-25 | 1 | -6/+13 |
| | |||||
* | Use GenericDefIdMore | Aleksey Kladov | 2019-11-25 | 1 | -4/+4 |
| | |||||
* | Use GenericDefId more | Aleksey Kladov | 2019-11-25 | 1 | -3/+3 |
| | |||||
* | Switch to variant-granularity field type inference | Aleksey Kladov | 2019-11-24 | 1 | -2/+3 |
| | |||||
* | Remove ids module | Aleksey Kladov | 2019-11-24 | 1 | -0/+8 |
| | |||||
* | Remove old hir::generics module | Aleksey Kladov | 2019-11-21 | 1 | -11/+11 |
| | |||||
* | Move constants to new ID | Aleksey Kladov | 2019-11-20 | 1 | -2/+3 |
| | | | | This allows us to get rid of trait item index | ||||
* | Move type inlay hint truncation to language server | Emil Lauridsen | 2019-11-19 | 1 | -0/+20 |
| | | | | | | | | | | | | This commit implements a general truncation framework for HirFormatter that keeps track of how much has been output so far. This information can then be used to perform truncation inside the language server, instead of relying on the client. Initial support is implemented for truncating types hints using the maxInlayHintLength server config option. The existing solution in the VSCode extension has been removed in favor of letting the server truncate type hints. | ||||
* | Disable doctests | Aleksey Kladov | 2019-11-17 | 1 | -2/+2 |
| | |||||
* | Fix handling of the binders in dyn/impl Trait | Florian Diebold | 2019-11-16 | 1 | -32/+57 |
| | | | | | | | | | We need to be more careful now when substituting bound variables (previously, we didn't have anything that used bound variables except Chalk, so it was not a problem). This is obviously quite ad-hoc; Chalk has more infrastructure for handling this in a principled way, which we maybe should adopt. | ||||
* | Reduce duplication between uncertain floats & ints | Aleksey Kladov | 2019-11-13 | 1 | -3/+3 |
| | |||||
* | Don't reexport generics from HIR | Aleksey Kladov | 2019-11-11 | 1 | -6/+6 |
| | |||||
* | Move Namespace enum closer to usage | Aleksey Kladov | 2019-11-04 | 1 | -1/+1 |
| | |||||
* | Various review fixes | Florian Diebold | 2019-11-01 | 1 | -0/+1 |
| | |||||
* | Get trait assoc item resolution mostly working | Florian Diebold | 2019-11-01 | 1 | -5/+13 |
| | |||||
* | remove forward pointer for type_ref | Aleksey Kladov | 2019-10-30 | 1 | -2/+2 |
| | |||||
* | make_mut_slice | Shotaro Yamada | 2019-10-14 | 1 | -16/+10 |
| | |||||
* | `.collect()` directly into `Arc<[T]>` | Shotaro Yamada | 2019-10-14 | 1 | -4/+2 |
| | |||||
* | Avoid cloning `Arc<[T]>` into a vec if possible | Shotaro Yamada | 2019-10-14 | 1 | -19/+17 |
| | |||||
* | Add SubstsBuilder | Florian Diebold | 2019-09-26 | 1 | -6/+135 |
| | | | | + further refactoring. | ||||
* | Avoid intermediate allocation | Shotaro Yamada | 2019-09-25 | 1 | -1/+1 |
| | |||||
* | Give closures types | Florian Diebold | 2019-09-24 | 1 | -1/+22 |
| | |||||
* | Handle associated type shorthand (`T::Item`) | Florian Diebold | 2019-09-22 | 1 | -2/+2 |
| | | | | | | | | | | | | 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... | ||||
* | Upgrade Chalk | Florian Diebold | 2019-09-14 | 1 | -45/+0 |
| | | | | ... and remove Ty::UnselectedProjection. It'll be handled differently. | ||||
* | rename AdtDef -> Adt | Aleksey Kladov | 2019-09-12 | 1 | -6/+6 |
| | |||||
* | Make type walking infrastructure a bit nicer | Florian Diebold | 2019-09-03 | 1 | -113/+120 |
| | | | | | 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. | ||||
* | Properly format `impl Trait<Type = Foo>` types | Florian Diebold | 2019-09-03 | 1 | -19/+93 |
| | | | | | | It's a bit complicated because we basically have to 'undo' the desugaring, and the result is very dependent on the specifics of the desugaring and will probably produce weird results otherwise. | ||||
* | Add support for associated type bindings (`where Trait<Type = X>`) | Florian Diebold | 2019-09-03 | 1 | -0/+33 |
| | |||||
* | Handle impl/dyn Trait in method resolution | Florian Diebold | 2019-08-22 | 1 | -0/+13 |
| | | | | | | | | | | | | | When we have one of these, the `Trait` doesn't need to be in scope to call its methods. So we need to consider this when looking for method candidates. (Actually I think the same is true when we have a bound `T: some::Trait`, but we don't handle that yet). At the same time, since Chalk doesn't handle these types yet, add a small hack to skip Chalk in method resolution and just consider `impl Trait: Trait` always true. This is enough to e.g. get completions for `impl Trait`, but since we don't do any unification we won't infer the return type of e.g. `impl Into<i64>::into()`. | ||||
* | Add `impl Trait` and `dyn Trait` types | Florian Diebold | 2019-08-22 | 1 | -10/+110 |
| | | | | | | | - 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 | ||||
* | Improve debug logging a bit | Florian Diebold | 2019-08-12 | 1 | -0/+14 |
| | |||||
* | Add representations of associated types | Florian Diebold | 2019-08-12 | 1 | -0/+86 |
| | | | | | | | | | | | | This adds three different representations, copied from the Chalk model: - `Ty::Projection` is an associated type projection written somewhere in the code, like `<Foo as Trait>::Bar`. - `Ty::UnselectedProjection` is similar, but we don't know the trait yet (`Foo::Bar`). - The above representations are normalized to their actual types during type inference. When that isn't possible, for example for `T::Item` inside an `fn foo<T: Iterator>`, the type is normalized to an application type with `TypeCtor::AssociatedType`. | ||||
* | provide completion in struct patterns | Ekaterina Babshukova | 2019-07-21 | 1 | -1/+1 |
| | |||||
* | Some renamings for clarity | Florian Diebold | 2019-07-14 | 1 | -1/+1 |
| | |||||
* | Unify `normalize` and `implements` to simplify code | Florian Diebold | 2019-07-08 | 1 | -1/+1 |
| | |||||
* | Refactor a bit & introduce Environment struct | Florian Diebold | 2019-07-08 | 1 | -1/+1 |
| | |||||
* | Add trait obligations for where clauses when calling functions/methods | Florian Diebold | 2019-07-06 | 1 | -2/+2 |
| | | | | | E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x: Into<u32>`, etc. |