aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
Commit message (Collapse)AuthorAgeFilesLines
...
* fix profile nameAleksey Kladov2019-07-091-1/+1
|
* Merge #1515bors[bot]2019-07-098-106/+281
|\ | | | | | | | | | | | | | | | | | | | | | | 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-086-94/+62
| |
| * Use environment for associated type normalization as wellFlorian Diebold2019-07-086-19/+51
| |
| * Start handling environment in trait resolutionFlorian Diebold2019-07-086-14/+103
| | | | | | | | | | 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-085-19/+105
| |
* | Merge #1512bors[bot]2019-07-092-17/+103
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 1512: Infer ? operator r=unrealhoang a=unrealhoang Logical continuation of https://github.com/rust-analyzer/rust-analyzer/pull/1501 cc https://github.com/rust-analyzer/rust-analyzer/issues/1426 Co-authored-by: Unreal Hoang <[email protected]>
| * | beautify testsUnreal Hoang2019-07-091-20/+36
| | |
| * | use namespaced consts for KnownNameUnreal Hoang2019-07-081-12/+10
| | |
| * | projection over std::ops::Try::Ok to infer try/?Unreal Hoang2019-07-082-2/+74
| |/
* / Look for the fXX_runtime lang items during method resolution.Marco Groppo2019-07-081-4/+6
|/
* cargo formatMuhammad Mominul Huque2019-07-071-3/+3
|
* Constify KnownName'sMuhammad Mominul Huque2019-07-071-6/+7
|
* Merge #1501bors[bot]2019-07-074-35/+156
|\ | | | | | | | | | | | | | | 1501: Infer for loop variable r=flodiebold a=unrealhoang My take on https://github.com/rust-analyzer/rust-analyzer/issues/1425 Co-authored-by: Unreal Hoang <[email protected]>
| * add projection to infer for loop variableUnreal Hoang2019-07-074-35/+156
| |
* | Merge #1499bors[bot]2019-07-071-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 1499: processing attribute #[path] of module r=matklad a=andreevlex support two cases - simple name file `foo.rs` - declaration in mod.rs #1211 Co-authored-by: Alexander Andreev <[email protected]>
| * Moved module resolution test in mods.rsAlexander Andreev2019-07-071-1/+1
| |
* | Make EnumVariant a GenericDef and simplify some codeFlorian Diebold2019-07-063-11/+12
| |
* | Add trait obligations for where clauses when calling functions/methodsFlorian Diebold2019-07-064-30/+140
|/ | | | | 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-054-9/+9
|
* Merge #1491bors[bot]2019-07-051-1/+1
|\ | | | | | | | | | | | | | | | | | | 1491: More clippy r=matklad a=kjeremy A few more clippy changes. I'm a little unsure of the second commit. It's the trivially_copy_pass_by_ref lint and there are a number of places in the code we could use it if it makes sense. Co-authored-by: Jeremy Kolb <[email protected]>
| * Clippy changesJeremy Kolb2019-07-051-1/+1
| |
* | Fix clippy::redundant_cloneShotaro Yamada2019-07-051-2/+1
|/
* Some clippy fixes for 1.36Jeremy Kolb2019-07-042-10/+8
|
* allow rustfmt to reorder importsAleksey Kladov2019-07-049-63/+67
| | | | | | 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-262-194/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Add commentShotaro Yamada2019-06-251-6/+8
|
* Method resolution for slicesShotaro Yamada2019-06-241-25/+36
|
* rename XSignature -> XDataAleksey Kladov2019-06-183-25/+23
|
* Add test for autoderef infinite recursionFlorian Diebold2019-06-161-0/+25
|
* Simplifications / cleanup from reviewFlorian Diebold2019-06-163-3/+4
|
* Some more cleanupFlorian Diebold2019-06-151-4/+4
|
* Check that Deref has the right number of parametersFlorian Diebold2019-06-151-2/+7
|
* Somewhat handle variables in the derefed type, and add another testFlorian Diebold2019-06-152-5/+50
|
* Implement * operation using Deref traitFlorian Diebold2019-06-151-3/+5
|
* Implement autoderef using the Deref traitFlorian Diebold2019-06-154-33/+84
| | | | - add support for other lang item targets, since we need the Deref lang item
* Add basic infrastructure for assoc type projectionFlorian Diebold2019-06-153-10/+135
|
* Add test for DerefFlorian Diebold2019-06-151-0/+29
|
* check for cancellation when executing queriesAleksey Kladov2019-06-122-2/+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.
* remove inherent source implsAleksey Kladov2019-06-111-1/+1
|
* use Source for FunctionAleksey Kladov2019-06-111-1/+1
|
* remove some hacks from nameresolution for macrosAleksey Kladov2019-06-081-2/+4
|
* somewhat better nameAleksey Kladov2019-06-082-19/+22
|
* [#1083] Try block syntax: fix testsAndrey Tkachenko2019-06-061-1/+0
|
* [#1083] Try block syntaxAndrey Tkachenko2019-06-061-0/+6
|
* Fix clippy::or_fun_callAlan Du2019-06-041-1/+1
|
* Fix clippy::identity_conversionAlan Du2019-06-041-3/+3
|
* Fix clippy::into_iter_on_refAlan Du2019-06-041-1/+1
|
* Fix clippy::single_matchAlan Du2019-06-043-47/+33
|
* 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.