aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/traits/chalk.rs
Commit message (Collapse)AuthorAgeFilesLines
* Align CallableDefId naming with other idsAleksey Kladov2020-07-161-2/+2
|
* Rename CallableDefId -> InternedCallabelDefidAleksey Kladov2020-07-161-3/+3
|
* Remove TypeCtor interningFlorian Diebold2020-07-151-12/+0
| | | | Our TypeCtor and Chalk's TypeName match now!
* Use Chalk closure supportFlorian Diebold2020-07-151-52/+35
|
* Search more efficiently for int/float implsFlorian Diebold2020-07-121-12/+34
|
* Enable Chalk tracing in hir_ty testsFlorian Diebold2020-07-121-6/+3
|
* Upgrade ChalkFlorian Diebold2020-07-121-4/+32
|
* Split `CrateImplDefs` in inherent and trait implsJonas Schievink2020-07-011-6/+4
| | | | | | This makes the intention of inherent vs. trait impls somewhat more clear and also fixes (?) an issue where trait impls with an unresolved trait were added as inherent impls instead (hence the test changes).
* Bump chalkLaurențiu Nicola2020-06-261-15/+71
|
* Replace `impls_in_trait` with `CrateImplDefs`Jonas Schievink2020-06-191-8/+20
|
* Implement return position impl trait / opaque type supportFlorian Diebold2020-06-051-10/+42
| | | | | | | | | | | | | 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.
* Upgrade ChalkFlorian Diebold2020-05-271-25/+25
| | | | | Chalk newly added TypeName::Never and Array; I implemented the conversion for Never, but not Array since that expects a const argument.
* Use Chalk's built-in representation of function item typesFlorian Diebold2020-05-221-4/+35
|
* Use TypeCtorId as AdtId directly, and rename the type alias StructId -> AdtIdFlorian Diebold2020-05-221-8/+8
|
* Split up chalk module a bitFlorian Diebold2020-05-221-958/+12
|
* Provide Chalk well-known traitsFlorian Diebold2020-05-221-6/+33
|
* Use Chalk's built-in representations of primitive typesFlorian Diebold2020-05-221-10/+160
| | | | For references, we make sure Chalk actually gets a lifetime here.
* Update ChalkFlorian Diebold2020-05-221-45/+74
| | | | | As always, this just makes compilation work, we don't use the newly available functionality yet.
* Chalk upgradeFlorian Diebold2020-05-161-19/+38
|
* Update Chalk, and cache Chalk env elaboration through a queryFlorian Diebold2020-04-201-22/+123
| | | | This should fix some of the worst performance problems.
* Fix another crash from wrong bindersFlorian Diebold2020-04-171-5/+5
| | | | | | | 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.
* Switch Chalk to recursive solverFlorian Diebold2020-04-161-4/+4
| | | | + various fixes related to that.
* Update ChalkFlorian Diebold2020-04-161-2/+3
|
*-. Merge #3966 #3968bors[bot]2020-04-151-5/+67
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3966: Add support for bounds on associated types in trait definitions r=matklad a=flodiebold E.g. ```rust trait Trait { type Item: SomeOtherTrait; } ``` Note that these don't simply desugar to where clauses; as I understand it, where clauses have to be proved by the *user* of the trait, but these bounds are proved by the *implementor*. (Also, where clauses on associated types are unstable.) (Another one from my recursive solver branch...) 3968: Remove format from syntax_bridge hot path r=matklad a=edwin0cheng Although only around 1% speed up by running: ``` Measure-Command {start-process .\target\release\rust-analyzer "analysis-stats -q ." -NoNewWindow -wait} ``` Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Edwin Cheng <[email protected]>
| * | Add support for bounds on associated types in trait definitionsFlorian Diebold2020-04-131-5/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. ``` trait Trait { type Item: SomeOtherTrait; } ``` Note that these don't simply desugar to where clauses; as I understand it, where clauses have to be proved by the *user* of the trait, but these bounds are proved by the *implementor*. (Also, where clauses on associated types are unstable.)
* | | Upgrade ChalkFlorian Diebold2020-04-131-13/+66
|/ /
* / Look up impls by self typeFlorian Diebold2020-04-111-4/+7
|/ | | | | This speeds up inference in analysis-stats by ~30% (even more with the recursive solver).
* Implement Chalk's debug methods using TLSFlorian Diebold2020-04-101-42/+39
| | | | | | | | | | Chalk now panics if we don't implement these methods and run with CHALK_DEBUG, so I thought I'd try to implement them 'properly'. Sadly, it seems impossible to do without transmuting lifetimes somewhere. The problem is that we need a `&dyn HirDatabase` to get names etc., which we can't just put into TLS. I thought I could just use `scoped-tls`, but that doesn't support references to unsized types. So I put the `&dyn` into another struct and put the reference to *that* into the TLS, but I have to transmute the lifetime to 'static for that to work.
* Fix Chalk panicFlorian Diebold2020-04-061-1/+6
| | | | | 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.
* Upgrade Chalk againFlorian Diebold2020-04-051-12/+18
| | | | | | | 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.
* Upgrade ChalkFlorian Diebold2020-04-051-24/+99
|
* Use `dyn Trait` for working with databseAleksey Kladov2020-03-161-57/+54
| | | | | | | 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).
* Drop larlpop-intern depLaurențiu Nicola2020-03-031-2/+2
|
* Update chalk for Ty internersLaurențiu Nicola2020-03-021-8/+11
|
* Update chalk for RawId removalLaurențiu Nicola2020-03-021-13/+7
|
* Rename ast::ImplBlock -> ast::ImplDefAleksey Kladov2020-02-291-4/+4
|
* Bump chalk and replace TypeFamily with InternerLaurențiu Nicola2020-02-241-49/+58
|
* Implement dyn Trait unsizing as wellFlorian Diebold2020-02-221-1/+3
|
* More manual clippy fixesKirill Bulatov2020-02-181-2/+1
|
* Run cargo +nightly fix --clippy -Z unstable-optionsKirill Bulatov2020-02-181-5/+5
|
* Rename Ty::Param => Ty::PlaceholderFlorian Diebold2020-02-141-2/+2
| | | | This aligns more with Chalk.
* FormattingFlorian Diebold2020-02-071-3/+8
|
* Use variables in predicates as wellFlorian Diebold2020-02-071-3/+3
|
* Change Ty::Param to contain param IDFlorian Diebold2020-02-071-12/+12
|
* Upgrade ChalkFlorian Diebold2020-01-271-55/+53
|
* Filter out error predicates in type bounds as wellFlorian Diebold2019-12-221-2/+12
|
* Introduce our own Chalk TypeFamily, instead of using ChalkIrFlorian Diebold2019-12-221-67/+89
| | | | | | It's not very different, except we can directly use Salsa IDs instead of casting them. This means we need to refactor the handling of errors to get rid of UNKNOWN_TRAIT though.
* Refactor Chalk integration some moreFlorian Diebold2019-12-221-72/+76
|
* Update Chalk, clean up Chalk integration a bitFlorian Diebold2019-12-221-93/+87
|
* Use generic ItemLoc for implsAleksey Kladov2019-12-201-1/+1
|