aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/traits.rs
Commit message (Collapse)AuthorAgeFilesLines
* More ids in TyAleksey Kladov2019-11-251-2/+3
|
* Remove ids moduleAleksey Kladov2019-11-241-1/+10
|
* Upgrade Chalk againFlorian Diebold2019-11-161-3/+6
|
* Fix handling of the binders in dyn/impl TraitFlorian Diebold2019-11-161-3/+4
| | | | | | | | | 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.
* Upgrade ChalkFlorian Diebold2019-11-161-1/+12
| | | | | Associated type values (in impls) are now a separate entity in Chalk, so we have to intern separate IDs for them.
* Upgrade Chalk (without using its dyn/impl Trait support)Florian Diebold2019-10-261-3/+3
|
* `.collect()` directly into `Arc<[T]>`Shotaro Yamada2019-10-141-1/+1
|
* correctly reset chalk state after a panicAleksey Kladov2019-09-281-6/+9
|
* replace horrible hack with a slightly less horrible oneAleksey Kladov2019-09-271-0/+3
|
* Make the closure_1 test workFlorian Diebold2019-09-241-0/+8
|
* Make closures impl closure traitsFlorian Diebold2019-09-241-1/+35
|
* Use traits from where clauses for method resolutionFlorian Diebold2019-09-071-0/+15
| | | | | E.g. if we have `T: some::Trait`, we can call methods from that trait without it needing to be in scope.
* Make type walking infrastructure a bit nicerFlorian Diebold2019-09-031-16/+4
| | | | | 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.
* Add support for associated type bindings (`where Trait<Type = X>`)Florian Diebold2019-09-031-0/+27
|
* implement durabilityAleksey Kladov2019-08-151-1/+1
|
* switch from volatile to untracked readAleksey Kladov2019-08-151-17/+37
|
* Improve debug logging a bitFlorian Diebold2019-08-121-4/+4
|
* Switch to Chalk master, without fuelFlorian Diebold2019-07-151-1/+1
|
* Some renamings for clarityFlorian Diebold2019-07-141-7/+7
|
* fix profile nameAleksey Kladov2019-07-091-1/+1
|
* Unify `normalize` and `implements` to simplify codeFlorian Diebold2019-07-081-17/+4
|
* Use environment for associated type normalization as wellFlorian Diebold2019-07-081-13/+2
|
* Start handling environment in trait resolutionFlorian Diebold2019-07-081-3/+5
| | | | | I.e. if we are inside a function with some where clauses, we assume these where clauses hold.
* Refactor a bit & introduce Environment structFlorian Diebold2019-07-081-8/+23
|
* add projection to infer for loop variableUnreal Hoang2019-07-071-1/+1
|
* Add trait obligations for where clauses when calling functions/methodsFlorian Diebold2019-07-061-1/+10
| | | | | E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x: Into<u32>`, etc.
* Clippy trivially_copy_pass_by_refJeremy Kolb2019-07-051-1/+1
|
* allow rustfmt to reorder importsAleksey Kladov2019-07-041-6/+6
| | | | | | This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway
* cache chalk queriesAleksey Kladov2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a significant speedup, because chalk will call these functions several times even withing a single revision. The only significant one here is `impl_data`, but I figured it might be good to cache others just for consistency. The results I get are: Before: from scratch: 16.081457952s no change: 15.846493ms trivial change: 352.95592ms comment change: 361.998408ms const change: 457.629212ms After: from scratch: 14.910610278s no change: 14.934647ms trivial change: 85.633023ms comment change: 96.433023ms const change: 171.543296ms Seems like a nice win!
* Simplifications / cleanup from reviewFlorian Diebold2019-06-161-1/+1
|
* Implement autoderef using the Deref traitFlorian Diebold2019-06-151-2/+2
| | | | - add support for other lang item targets, since we need the Deref lang item
* Add basic infrastructure for assoc type projectionFlorian Diebold2019-06-151-1/+32
|
* check for cancellation when executing queriesAleksey Kladov2019-06-121-1/+0
| | | | | | | Note that we can't just remove CheckCanceled trait altogether: sometimes it's useful to check for cancellation while the query is running! We do this, for example, in the name resolution fixed-point loop.
* don't poison mutex around chalkAleksey Kladov2019-06-011-2/+3
| | | | | | | | | We use panics for cancellation, so we could trigger panic while holding the solver. std::sync::Mutex will be poisoned as a result, which and all further attempts to use solver (from other threads) will panic as well. This commit switches to parking_lot::Mutex which just unlocks on panic.
* add cacellation checks to expensive queriesAleksey Kladov2019-05-291-0/+1
|
* Use fuel branch for ChalkFlorian Diebold2019-05-211-1/+1
| | | | This makes sure we don't take too long in trait solving.
* re-enable chalkAleksey Kladov2019-05-211-17/+16
|
* publish gen_lsp_server 0.2Aleksey Kladov2019-05-211-16/+17
|
* profile implements queryAleksey Kladov2019-05-211-0/+2
|
* add _query to query functionsAleksey Kladov2019-05-211-3/+3
|
* Increase Chalk solver max_size back to 4Florian Diebold2019-05-131-1/+1
| | | | | | Reducing it to 2 was just a failed attempt to see whether that would help fix some slow cases; in fact, it can create new slow cases by replacing concrete types by variables.
* Reduce Chalk max_size parameter, add test for slow caseFlorian Diebold2019-05-111-1/+8
|
* Deduplicate impls in impls_for_traitFlorian Diebold2019-05-071-2/+3
| | | | This was duplicating impls in dependencies a lot...
* Turn `implements` into a query againFlorian Diebold2019-05-071-3/+3
|
* Turn eprintln!s into debug!sFlorian Diebold2019-05-041-2/+3
|
* Canonicalize before doing method resolutionFlorian Diebold2019-05-041-5/+2
|
* Document the peculiarity of the solver query a bitFlorian Diebold2019-05-041-2/+4
| | | | | Also remove the only remaining mention of chalk outside of the ty::traits module.
* Move Chalk conversion code to its own moduleFlorian Diebold2019-05-041-275/+8
|
* Simplify solution_from_chalkFlorian Diebold2019-05-041-12/+11
|
* Chalk integrationFlorian Diebold2019-05-041-90/+403
| | | | | - add proper canonicalization logic - add conversions from/to Chalk IR