aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits/chalk.rs
Commit message (Collapse)AuthorAgeFilesLines
* Improve indexing of implsFlorian Diebold2021-04-091-1/+1
| | | | | | Store impls for e.g. &Foo with the ones for Foo instead of the big "other" bucket. This can improve performance and simplifies the HIR impl search a bit.
* Remove unusedFlorian Diebold2021-04-081-1/+1
|
* Replace `make_binders` by the now equivalent `make_only_type_binders`Florian Diebold2021-04-081-21/+22
|
* Remove identity impls for ToChalkFlorian Diebold2021-04-081-24/+14
|
* Add HasInterner boundsFlorian Diebold2021-04-081-1/+1
|
* Move hir_trait_id to extension traitFlorian Diebold2021-04-071-1/+1
|
* Move Ty accessors to TyExtLukas Wirth2021-04-061-1/+1
|
* Binders::wrap_empty -> wrap_empty_bindersFlorian Diebold2021-04-051-6/+2
|
* Substitution::single -> from1Florian Diebold2021-04-051-2/+4
|
* Use VariableKinds in BindersFlorian Diebold2021-04-051-5/+5
|
* Hide Binders internals moreFlorian Diebold2021-04-051-21/+22
|
* Rename TyKind::Unknown to ErrorLaurențiu Nicola2021-04-051-1/+1
|
* Replace Substitution::bound_vars and ::type_params_for_genericsFlorian Diebold2021-04-041-5/+5
|
* Add TyBuilder::unit() and TyExt::is_unit()Florian Diebold2021-04-041-2/+2
|
* Rename Ty::interned to Ty::kindFlorian Diebold2021-04-031-1/+1
| | | | ... since that's the actual method on Chalk side that matches the signature.
* Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-031-5/+5
| | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* Fix chalk_ir assertionFlorian Diebold2021-03-241-5/+3
| | | | Fixes #8150.
* Introduce QuantifiedWhereClause and DynTy analogous to ChalkFlorian Diebold2021-03-211-2/+8
| | | | | This introduces a bunch of new binders in lots of places, which we have to be careful about, but we had to add them at some point.
* Ignore type bindings in generic_predicates_for_paramFlorian Diebold2021-03-211-1/+1
| | | | | | | | | | | | | This allows us to handle more cases without a query cycle, which includes certain cases that rustc accepted. That in turn means we avoid triggering salsa-rs/salsa#257 on valid code (it will still happen if the user writes an actual cycle). We actually accept more definitions than rustc now; that's because rustc only ignores bindings when looking up super traits, whereas we now also ignore them when looking for predicates to disambiguate associated type shorthand. We could introduce a separate query for super traits if necessary, but for now I think this should be fine.
* Remove WhereClause::ErrorFlorian Diebold2021-03-201-7/+1
| | | | | Chalk doesn't have it, and judging from the removed code, it wasn't useful anyway.
* Rename GenericPredicate -> WhereClauseFlorian Diebold2021-03-201-4/+4
|
* Replace Projection variant in GenericPredicate with AliasEqLukas Wirth2021-03-191-8/+8
|
* Chalkify TraitRefFlorian Diebold2021-03-181-5/+5
|
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-9/+9
|
* Use hir formatter moreoxalica2021-03-151-1/+1
|
* Rename some fields to their Chalk namesFlorian Diebold2021-03-141-2/+2
|
* Move type lowering methods to TyLoweringContextFlorian Diebold2021-03-131-1/+1
|
* Use chalk_ir::OpaqueTyIdFlorian Diebold2021-03-131-4/+3
|
* Use chalk_ir::ClosureIdFlorian Diebold2021-03-131-3/+3
|
* Use chalk_ir::FnDefIdFlorian Diebold2021-03-131-2/+2
|
* Use chalk_ir::AssocTypeIdFlorian Diebold2021-03-131-9/+8
|
* Separate `Ty` and `TyKind` like in ChalkFlorian Diebold2021-03-131-13/+19
| | | | | Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
* Simplify a bitFlorian Diebold2021-03-121-10/+5
|
* Use Chalk Environment more directlyFlorian Diebold2021-03-121-2/+2
|
* Delete `ContainerId`Jonas Schievink2021-03-091-2/+2
|
* Use chalk_ir::AdtIdLukas Wirth2021-03-041-8/+6
|
* Introduce Ty::AliasLukas Wirth2021-03-011-5/+5
|
* Lift FnPointer into a structLukas Wirth2021-02-281-3/+2
|
* Inline TypeCtor into TyLukas Wirth2021-02-281-4/+5
|
* Bump chalkLaurențiu Nicola2021-02-021-2/+2
|
* Make `ModuleId`'s `krate` field privateJonas Schievink2021-01-221-2/+2
|
* Bump chalkLaurențiu Nicola2020-12-231-2/+9
|
* Upgrade ChalkFlorian Diebold2020-12-071-3/+46
| | | | | | | Also make overflow depth and max type size configurable through env variables. This can be helpful at least for debugging. Fixes #6628.
* Remove more unreachable pubsAleksey Kladov2020-11-021-1/+1
|
* Upgrade Chalk to 0.36Florian Diebold2020-10-301-11/+10
| | | | Quite a few changes, because Chalk got rid of the `ApplicationTy` nesting.
* `todo!()` -> `unimplemented!() // FIXME` for CICasey Primozic2020-10-061-2/+4
|
* Bump chalk to use latest git to get fixCasey Primozic2020-10-061-0/+12
| | | | * Chalk very recently (like an hour ago) merged a fix that prevents rust analyzer from panicking. This allows it to be usable again for code that hits those situations. See #6134, #6145, Probably #6120
* Update chalk to 0.28.0Bram van den Heuvel2020-09-251-2/+8
|
* Update chalk to 0.27 and adapt to chalk changes.Charles Lew2020-09-151-8/+14
|
* Merge #5971bors[bot]2020-09-131-21/+84
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971: Implement async blocks r=flodiebold a=oxalica Fix #4018 @flodiebold already gave a generic guide in the issue. Here's some concern about implementation detail: - Chalk doesn't support generator type yet. - Adding generator type as a brand new type (ctor) can be complex and need to *re-introduced* builtin impls. (Like how we implement closures before native closure support of chalk, which is already removed in #5401 ) - The output type of async block should be known after type inference of the whole body. - We cannot directly get the type from source like return-positon-impl-trait. But we still need to provide trait bounds when chalk asking for `opaque_ty_data`. - During the inference, the output type of async block can be temporary unknown and participate the later inference. `let a = async { None }; let _: i32 = a.await.unwrap();` So in this PR, the type of async blocks is inferred as an opaque type parameterized by the `Future::Output` type it should be, like what we do with closure type. And it really works now. Well, I still have some questions: - The bounds `AsyncBlockImplType<T>: Future<Output = T>` is currently generated in `opaque_ty_data`. I'm not sure if we should put this code here. - Type of async block is now rendered as `impl Future<Output = OutputType>`. Do we need to special display to hint that it's a async block? Note that closure type has its special format, instead of `impl Fn(..) -> ..` or function type. Co-authored-by: oxalica <[email protected]>