aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/method_resolution.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove old impls infrastructureAleksey Kladov2019-11-151-58/+22
|
* Reduce duplication between uncertain floats & intsAleksey Kladov2019-11-131-6/+5
|
* Various review fixesFlorian Diebold2019-11-011-6/+5
|
* Add some doc commentsFlorian Diebold2019-11-011-0/+6
|
* Complete trait assoc itemsFlorian Diebold2019-11-011-1/+1
|
* Refactor a bitFlorian Diebold2019-11-011-36/+25
|
* Don't do autoderef for path resolutionFlorian Diebold2019-11-011-18/+39
|
* Refactor to unify with method resolutionFlorian Diebold2019-11-011-23/+67
|
* remove forward pointer for type_refAleksey Kladov2019-10-301-2/+1
|
* introduce ra_hir_defAleksey Kladov2019-10-301-6/+6
|
* Add SubstsBuilderFlorian Diebold2019-09-261-13/+5
| | | | + further refactoring.
* Merge #1906bors[bot]2019-09-251-2/+5
|\ | | | | | | | | | | | | | | 1906: Add missing lang-items to `def_crates` r=matklad a=sinkuu Co-authored-by: Shotaro Yamada <[email protected]>
| * Add missing lang-items to `def_crates`Shotaro Yamada2019-09-251-2/+5
| |
* | Remove redundant clone()Shotaro Yamada2019-09-251-1/+1
|/
* Remove TraitItem and ImplItem in favor of AssocItemFlorian Diebold2019-09-171-6/+5
|
* cleanup hir db importsAleksey Kladov2019-09-081-1/+2
|
* Use traits from where clauses for method resolutionFlorian Diebold2019-09-071-1/+7
| | | | | E.g. if we have `T: some::Trait`, we can call methods from that trait without it needing to be in scope.
* Handle impl/dyn Trait in method resolutionFlorian Diebold2019-08-221-2/+14
| | | | | | | | | | | | | 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()`.
* show inherent and trait impls of structs and enumsEkaterina Babshukova2019-08-161-0/+9
|
* do fixup: remove unused importEvgenii P2019-08-021-1/+1
|
* Relax trait solving more for completionEvgenii P2019-08-021-7/+1
|
* rustfmtEvgenii P2019-08-021-3/+9
|
* Implement completion for the .await syntaxEvgenii P2019-08-021-1/+15
|
* Some renamings for clarityFlorian Diebold2019-07-141-3/+3
|
* Merge #1515bors[bot]2019-07-091-9/+12
|\ | | | | | | | | | | | | | | | | | | | | | | 1515: Trait environment r=matklad a=flodiebold This adds the environment, i.e. the set of `where` clauses in scope, when solving trait goals. That means that e.g. in ```rust fn foo<T: SomeTrait>(t: T) {} ``` , we are able to complete methods of `SomeTrait` on the `t`. This affects the trait APIs quite a bit (since every method that needs to be able to solve for some trait needs to get this environment somehow), so I thought I'd do it rather sooner than later ;) Co-authored-by: Florian Diebold <[email protected]>
| * Unify `normalize` and `implements` to simplify codeFlorian Diebold2019-07-081-8/+8
| |
| * Start handling environment in trait resolutionFlorian Diebold2019-07-081-3/+4
| | | | | | | | | | 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-4/+6
| |
* | Look for the fXX_runtime lang items during method resolution.Marco Groppo2019-07-081-4/+6
|/
* Moved module resolution test in mods.rsAlexander Andreev2019-07-071-1/+1
|
* Clippy trivially_copy_pass_by_refJeremy Kolb2019-07-051-5/+5
|
* 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
* Add commentShotaro Yamada2019-06-251-6/+8
|
* Method resolution for slicesShotaro Yamada2019-06-241-25/+36
|
* rename XSignature -> XDataAleksey Kladov2019-06-181-4/+4
|
* Implement autoderef using the Deref traitFlorian Diebold2019-06-151-3/+2
| | | | - add support for other lang item targets, since we need the Deref lang item
* Fix clippy::single_matchAlan Du2019-06-041-22/+16
|
* Use traits from prelude for method resolutionFlorian Diebold2019-05-121-1/+1
|
* Fix impl blocks with unresolved target trait being treated as inherent implsFlorian Diebold2019-05-121-5/+7
|
* Turn `implements` into a query againFlorian Diebold2019-05-071-2/+1
|
* Update ChalkFlorian Diebold2019-05-041-1/+0
|
* Canonicalize before doing method resolutionFlorian Diebold2019-05-041-110/+109
|
* Chalk integrationFlorian Diebold2019-05-041-9/+20
| | | | | - add proper canonicalization logic - add conversions from/to Chalk IR
* lang_item_lookup is now a salsa query.Marco Groppo2019-04-191-6/+5
|
* New krate() method in Resolver.Marco Groppo2019-04-191-21/+7
| | | | Renamed Impl to ImplBlock.
* Initial support for lang items.Marco Groppo2019-04-191-4/+34
|
* Refactor method candidate generation a bitFlorian Diebold2019-04-141-53/+73
| | | | | | This fixes the order in which candidates are chosen a bit (not completely though, as the ignored test demonstrates), and makes autoderef work with trait methods. As a side effect, this also makes completion of trait methods work :)
* Extract generic_params method to a HasGenericParams traitFlorian Diebold2019-04-141-3/+5
|
* Some cleanupFlorian Diebold2019-04-141-6/+7
|
* More trait infrastructureFlorian Diebold2019-04-141-28/+19
| | | | | | | | | | - make it possible to get parent trait from method - add 'obligation' machinery for checking that a type implements a trait (and inferring facts about type variables from that) - handle type parameters of traits (to a certain degree) - improve the hacky implements check to cover enough cases to exercise the handling of traits with type parameters - basic canonicalization (will probably also be done by Chalk)