aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
Commit message (Collapse)AuthorAgeFilesLines
...
* | Added test for check doc strings in crates.Alexander Andreev2019-09-3027-9/+59
|/ | | | #1856
* Merge #1815bors[bot]2019-09-2717-124/+361
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1815: Support correct `$crate` expansion in macros r=uHOOCCOOHu a=uHOOCCOOHu This PR makes normal use cases of `$crate` from macros work as expected. It makes more macros from `std` work. Type inference works well with `panic`, `unimplemented`, `format`, and maybe more. Sadly that `vec![1, 2, 3]` still not works, but it is not longer an issue about macro. Screenshot: ![Screenshot_20190927_022136](https://user-images.githubusercontent.com/14816024/65714465-b4568f80-e0cd-11e9-8043-dd44c2ae8040.png) Co-authored-by: uHOOCCOOHu <[email protected]>
| * FixuHOOCCOOHu2019-09-272-2/+2
| |
| * Support `$crate` in item and expr place.uHOOCCOOHu2019-09-2612-35/+266
| |
| * Store crate info in `MacroDefId`uHOOCCOOHu2019-09-263-5/+11
| |
| * Refactor `Name` ready for hygienic macrouHOOCCOOHu2019-09-263-84/+84
| |
* | Add SubstsBuilderFlorian Diebold2019-09-2611-126/+212
|/ | | | + further refactoring.
* Support all coercion placesuHOOCCOOHu2019-09-253-96/+216
|
* Support custom `CoerceUnsized`uHOOCCOOHu2019-09-254-247/+476
| | | | Split out tests about coercion
* Better handle never type and branch merginguHOOCCOOHu2019-09-255-181/+392
| | | | Split out tests for never type to another file
* Support basic implicit type coerceuHOOCCOOHu2019-09-252-142/+383
|
* Support auto-deref in argument positionuHOOCCOOHu2019-09-252-1/+161
|
* Resolve trait associated itemsFlorian Diebold2019-09-255-19/+78
| | | | E.g. `Default::default` or `<Foo as Default>::default`.
* Fix retrieval of the Fn traitsFlorian Diebold2019-09-253-7/+6
| | | | | I used the wrong query, so it only used the lang items from the respective crate...
* 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-258-22/+14
| |
* | Avoid intermediate allocationShotaro Yamada2019-09-251-1/+1
|/
* Implement the call argument checking order hack for closuresFlorian Diebold2019-09-243-12/+108
|
* Make the closure_1 test workFlorian Diebold2019-09-243-27/+40
|
* Make closures impl closure traitsFlorian Diebold2019-09-244-41/+188
|
* Give closures typesFlorian Diebold2019-09-245-21/+78
|
* Upgrade Chalk againFlorian Diebold2019-09-241-3/+6
|
* Merge #1898bors[bot]2019-09-232-2/+2
|\ | | | | | | | | | | | | | | | | 1898: Drive by lints r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]> Co-authored-by: Jeremy Kolb <[email protected]>
| * Drive by lintskjeremy2019-09-232-2/+2
| |
* | Upgrade ChalkFlorian Diebold2019-09-231-4/+6
|/
* Split off path expression inference code into submoduleFlorian Diebold2019-09-232-172/+199
|
* Handle projection types from ChalkFlorian Diebold2019-09-221-1/+5
|
* Handle associated type shorthand (`T::Item`)Florian Diebold2019-09-226-22/+168
| | | | | | | | | | | | 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...
* fix module attr pathgfreezy2019-09-203-2/+40
|
* introduce FromSource traitEkaterina Babshukova2019-09-196-111/+247
|
* account for impls generated by macrosAleksey Kladov2019-09-183-28/+74
|
* Merge #1862bors[bot]2019-09-1712-242/+336
|\ | | | | | | | | | | | | | | 1862: Assoc item resolution refactoring (again) r=flodiebold a=flodiebold This is #1849, with the associated type selection code removed for now. Handling cycles there will need some more thought. Co-authored-by: Florian Diebold <[email protected]>
| * Remove assoc type selection code for now to fix crashesFlorian Diebold2019-09-172-25/+10
| |
| * Add test for `T::Item` cyclesFlorian Diebold2019-09-171-0/+42
| |
| * Remove TraitItem and ImplItem in favor of AssocItemFlorian Diebold2019-09-177-88/+41
| |
| * Small review improvementsFlorian Diebold2019-09-171-5/+3
| |
| * Add test for `<T>::Item`Florian Diebold2019-09-171-10/+22
| |
| * Refactor some moreFlorian Diebold2019-09-174-57/+100
| | | | | | | | | | | | Type-relative paths (`<T>::foo`) also need to work in type context, for example `<T>::Item` is legal. So rather than returning the type ref from the resolver function, just check it before.
| * Refactor associated item resolution moreFlorian Diebold2019-09-172-124/+120
| | | | | | | | | | When resolving an associated item in value namespace, use the `Ty` lowering code for the segments before the last instead of replicating it.
| * Refactor a bit to prepare for resolving trait assoc itemsFlorian Diebold2019-09-175-38/+66
| |
| * Resolve assoc types on type parametersFlorian Diebold2019-09-172-24/+61
| | | | | | | | | | | | E.g. `fn foo<T: Iterator>() -> T::Item`. It seems that rustc does this only for type parameters and only based on their bounds, so we also only consider traits from bounds.
| * Adapt some testsFlorian Diebold2019-09-171-12/+12
| |
* | remove confusing codeAleksey Kladov2019-09-171-31/+1
|/ | | | | | I must confess I don't really understand what this code is trying to do, but it definitely misreports changes during fixedpoint iteration, and no tests fail if I remove it, so...
* Merge #1817bors[bot]2019-09-169-144/+227
|\ | | | | | | | | | | | | | | 1817: Support path starting with a type r=matklad a=uHOOCCOOHu The path syntax `<Ty>::foo` Co-authored-by: uHOOCCOOHu <[email protected]>
| * Define known paths and group namesuHOOCCOOHu2019-09-156-49/+63
| |
| * Move store TypeRef of type based path in PathKinduHOOCCOOHu2019-09-153-20/+10
| |
| * Support path starting with a typeuHOOCCOOHu2019-09-157-124/+203
| |
* | Remove `is_unnamed`Dylan MacKenzie2019-09-161-4/+0
| |
* | Gracefully handle `const _` items in `ConstData`Dylan MacKenzie2019-09-162-5/+9
|/