aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
Commit message (Collapse)AuthorAgeFilesLines
...
* wip lower impl trait to type argsFlorian Diebold2020-02-074-4/+6
|
* wip implement lowering modeFlorian Diebold2020-02-072-26/+34
|
* Add impl trait lowering modeFlorian Diebold2020-02-074-32/+132
|
* Introduce TyLoweringContextFlorian Diebold2020-02-074-146/+130
|
* Standard formatting for array typesAleksey Kladov2020-01-285-89/+89
|
* Tweak Chalk settingsFlorian Diebold2020-01-271-2/+1
|
* Ignore failing impl Trait testsFlorian Diebold2020-01-271-0/+2
|
* Upgrade ChalkFlorian Diebold2020-01-273-61/+71
|
* Update cratesJeremy Kolb2020-01-261-1/+1
|
* Omit default parameters for reference typesKirill Bulatov2020-01-222-2/+7
|
* Fix inference for shift operatorsFlorian Diebold2020-01-173-5/+35
| | | | Fixes #2602.
* Merge #2844bors[bot]2020-01-141-2/+2
|\ | | | | | | | | | | | | | | 2844: Use dummy value for line! and column! macro r=matklad a=edwin0cheng Use dummy value `0` for line! and column! macro. Co-authored-by: Edwin Cheng <[email protected]>
| * Use dummy value for line! and column! macroEdwin Cheng2020-01-141-2/+2
| |
* | Push resolver further upAleksey Kladov2020-01-143-25/+44
| |
* | Push resolver upAleksey Kladov2020-01-141-21/+51
| |
* | Move impls_future to Type, where it belongsAleksey Kladov2020-01-141-2/+1
| |
* | Don't panic if chalk panicsAleksey Kladov2020-01-131-9/+35
|/
* Fix various names, e.g. Iterator not resolving in core preludeFlorian Diebold2020-01-111-0/+54
| | | | | | | | | | | | | Basically, `Iterator` is re-exported via several steps, which happened to not be resolved yet when we got to the prelude import, but since the name resolved to the reexport from `core::iter` (just to no actual items), we gave up trying to resolve it further. Maybe part of the problem is that we can have `PartialResolvedImport::Unresolved` or `PartialResolvedImport::Indeterminate` with `None` in all namespaces, and handle them differently. Fixes #2683.
* Add test for macro expansion in various expressionsFlorian Diebold2020-01-101-0/+81
|
* Expand PAREN_EXPR as expressionEdwin Cheng2020-01-101-0/+17
|
* Merge #2742bors[bot]2020-01-033-4/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2742: Split `infer` query into two for better profiling r=flodiebold a=michalt This is the same change as we did with `crate_def_map` and it does seem that we mostly spend time in salsa, without recomputing much on rust-analyzer side. Example output: ``` 233ms - handle_inlay_hints 163ms - get_inlay_hints 163ms - SourceAnalyzer::new 67ms - def_with_body_from_child_node 67ms - analyze_container 67ms - analyze_container 67ms - Module::from_definition 67ms - Module::from_file 67ms - crate_def_map 0ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 66ms - ??? 0ms - crate_def_map (1 calls) 0ms - crate_def_map (1 calls) 96ms - infer 2ms - trait_solve_query (2 calls) 94ms - ??? 0ms - body_with_source_map_query (1 calls) 0ms - crate_def_map (1 calls) [...] ``` Signed-off-by: Michal Terepeta <[email protected]> Co-authored-by: Michal Terepeta <[email protected]>
| * Split `infer` query into two for better profilingMichal Terepeta2020-01-033-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change as we did with `crate_def_map` and it does seem that we mostly spend time in salsa, without recomputing much on rust-analyzer side. Example output: ``` 233ms - handle_inlay_hints 163ms - get_inlay_hints 163ms - SourceAnalyzer::new 67ms - def_with_body_from_child_node 67ms - analyze_container 67ms - analyze_container 67ms - Module::from_definition 67ms - Module::from_file 67ms - crate_def_map 0ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 66ms - ??? 0ms - crate_def_map (1 calls) 0ms - crate_def_map (1 calls) 96ms - infer 2ms - trait_solve_query (2 calls) 94ms - ??? 0ms - body_with_source_map_query (1 calls) 0ms - crate_def_map (1 calls) [...] ``` Signed-off-by: Michal Terepeta <[email protected]>
* | Fix #2705Florian Diebold2020-01-032-1/+18
|/ | | | | | | | The `-` turned into a `+` during a refactoring. The original issue was caused by `Read` resolving wrongly to a trait without type parameters instead of a struct with one parameter; this only fixes the crash, not the wrong resolution.
* Resolve traits in infer using lang item infrastructureEmil Lauridsen2019-12-293-10/+19
|
* Don't add non-impl/trait containers to scopeAleksey Kladov2019-12-293-24/+95
|
* Merge #2657bors[bot]2019-12-272-17/+26
|\ | | | | | | | | | | | | | | | | | | 2657: Omit closure parameters in closure type display strings r=flodiebold a=SomeoneToIgnore Part of https://github.com/rust-analyzer/rust-analyzer/issues/1946 I wonder, should we display the the closure trait (Fn/FnMut/FnOnce) in inlay hints instead of `|...|` at all? Co-authored-by: Kirill Bulatov <[email protected]>
| * Omit closure parametersKirill Bulatov2019-12-232-17/+26
| |
* | Merge #2661bors[bot]2019-12-242-2/+78
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 2661: Implement infer await from async function r=flodiebold a=edwin0cheng This PR is my attempt for trying to add support for infer `.await` expression from an `async` function, by desugaring its return type to `Impl Future<Output=RetType>`. Note that I don't know it is supposed to desugaring it in that phase, if it is not suitable in current design, just feel free to reject it :) r=@flodiebold Co-authored-by: Edwin Cheng <[email protected]>
| * Check if parameters is emptyEdwin Cheng2019-12-241-4/+6
| |
| * Add FIXMEEdwin Cheng2019-12-241-1/+5
| |
| * Implement infer await from async funcEdwin Cheng2019-12-242-2/+72
| |
* | Filter out error predicates in type bounds as wellFlorian Diebold2019-12-222-2/+29
| |
* | Introduce our own Chalk TypeFamily, instead of using ChalkIrFlorian Diebold2019-12-224-87/+126
| | | | | | | | | | | | 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-222-79/+83
| |
* | Update Chalk, clean up Chalk integration a bitFlorian Diebold2019-12-224-125/+103
|/
* Rudimentary name resolution for local itemsAleksey Kladov2019-12-221-6/+6
|
* Merge #2626bors[bot]2019-12-211-0/+23
|\ | | | | | | | | | | | | | | 2626: Recursive collect macros in impl items r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * Recursive collect macros in impl itemsEdwin Cheng2019-12-201-0/+23
| |
* | Merge #2625bors[bot]2019-12-212-3/+3
|\ \ | |/ |/| | | | | | | | | | | 2625: Clippy lints r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * Clippy lintskjeremy2019-12-202-3/+3
| |
* | Merge #2624bors[bot]2019-12-203-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 2624: Separate module item from module scope r=matklad a=matklad bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
| * | Move impls to ItemScopeAleksey Kladov2019-12-203-3/+3
| | |
* | | Merge #2623bors[bot]2019-12-201-0/+19
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 2623: Add support macros in impl blocks r=matklad a=edwin0cheng This PR add support for macros in impl blocks, which reuse `Expander` for macro expansion. see also: #2459 Co-authored-by: Edwin Cheng <[email protected]>
| * | Add support macros in impl blocksEdwin Cheng2019-12-201-0/+19
| |/
* | Coerce closures to fn pointersFlorian Diebold2019-12-203-5/+48
| | | | | | | | E.g. `let x: fn(A) -> B = |x| { y };`
* | Fix coercion of last expression in function bodyFlorian Diebold2019-12-203-2/+18
| |
* | Handle closure return typesFlorian Diebold2019-12-204-4/+106
|/ | | | Fixes #2547.
* Merge #2592bors[bot]2019-12-203-5/+59
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2592: Add std::ops::Index support for infering r=edwin0cheng a=edwin0cheng see also #2534 Seem like this can't fix #2534 for this case: ```rust fn foo3(bar: [usize; 2]) { let baz = bar[1]; // <--- baz is still unknown ? println!("{}", baz); } ``` Co-authored-by: Edwin Cheng <[email protected]>
| * Use fill instread of for loopEdwin Cheng2019-12-191-5/+3
| |
| * Use build_for_defEdwin Cheng2019-12-191-1/+1
| |