aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup hir diagnostics APIAleksey Kladov2020-07-145-40/+48
|
* Consolidate hir diagnostics code in one placeAleksey Kladov2020-07-146-13/+14
|
* Don't copy-paste `impl_froms` into every crateAleksey Kladov2020-07-133-30/+9
|
* Reorder importsAleksey Kladov2020-07-133-8/+7
|
* Merge #5331bors[bot]2020-07-122-2/+63
|\ | | | | | | | | | | | | | | | | | | 5331: Fix #4966 r=flodiebold a=flodiebold We add a level of binders when converting our function pointer to Chalk's; we need to remove it again on the way back. Fixes #4966. Co-authored-by: Florian Diebold <[email protected]>
| * Fix #4966Florian Diebold2020-07-122-2/+63
| | | | | | | | | | We add a level of binders when converting our function pointer to Chalk's; we need to remove it again on the way back.
* | Remove some unnecessary file namesFlorian Diebold2020-07-121-3/+0
| |
* | Add test for #4281Florian Diebold2020-07-121-0/+23
| | | | | | | | Fixes #4281.
* | Search more efficiently for int/float implsFlorian Diebold2020-07-123-18/+118
| |
* | Adapt trait object coercion tests to the status quoFlorian Diebold2020-07-121-4/+51
| |
* | Use Chalk built-in representation for array typesFlorian Diebold2020-07-121-7/+36
| |
* | Remove built-in Unsize implsFlorian Diebold2020-07-124-235/+6
| | | | | | | | They exist in Chalk now.
* | Enable Chalk tracing in hir_ty testsFlorian Diebold2020-07-124-66/+52
| |
* | Upgrade ChalkFlorian Diebold2020-07-125-13/+63
|/
* infer: Add type inference support for Union typesOtavio Salvador2020-07-112-2/+32
| | | | | | | | This adds the type inference to Union types and add a small test case for it, ensuring it keeps working in future. Fixes: #5277 Signed-off-by: Otavio Salvador <[email protected]>
* arg count mismatch: handle tuple ctorsJonas Schievink2020-07-091-17/+34
|
* Address review commentsJonas Schievink2020-07-091-40/+27
|
* Add testsJonas Schievink2020-07-091-0/+129
|
* Fix diagnostic for method callsJonas Schievink2020-07-091-3/+12
|
* Correctly pluralize messageJonas Schievink2020-07-091-1/+2
|
* Don't emit diagnostic if there are type errorsJonas Schievink2020-07-091-0/+7
|
* Add argument count mismatch diagnosticJonas Schievink2020-07-092-5/+92
|
*-. Merge #5235 #5236 #5241bors[bot]2020-07-074-9/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5235: Don't ping people in PRs r=matklad a=lnicola 5236: Disable ES module interop r=matklad a=lnicola 5241: Clippy perf warnings r=matklad a=kjeremy Removes redundant clones Co-authored-by: Laurențiu Nicola <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]> Co-authored-by: kjeremy <[email protected]>
| | * Clippy perf warningskjeremy2020-07-064-9/+6
| |/ | | | | | | Removes redundant clones
* / Switch to fully dynamically dispatched salsaAleksey Kladov2020-07-075-22/+18
|/ | | | This improves compile times quite a bit
* Fix inference of indexing argument (partly)Florian Diebold2020-07-032-8/+48
| | | | | | | | We need to add the `T: Index<Arg>` obligation to be resolved later as well, otherwise we can't make inferences about `Arg` later based on the `Index` impls. This still doesn't fix indexing with integer variables though; there's a further problem with Chalk floundering because of the variable, I think.
* Merge #5149bors[bot]2020-07-017-66/+135
|\ | | | | | | | | | | | | | | | | | | 5149: Implement Chalk variable kinds r=flodiebold a=flodiebold This means we need to keep track of the kinds (general/int/float) of variables in `Canonical`, which requires some more ceremony. (It also exposes some places where we're not really dealing with canonicalization correctly -- another thing to be cleaned up when we switch to using Chalk's types directly.) Should fix the last remaining issue of #2534. Co-authored-by: Florian Diebold <[email protected]>
| * Implement Chalk variable kindsFlorian Diebold2020-07-017-66/+135
| | | | | | | | | | | | | | | | | | This means we need to keep track of the kinds (general/int/float) of variables in `Canonical`, which requires some more ceremony. (It also exposes some places where we're not really dealing with canonicalization correctly -- another thing to be cleaned up when we switch to using Chalk's types directly.) Should fix the last remaining issue of #2534.
* | ItemTree: Lower fields despite invalid typeJonas Schievink2020-07-011-0/+24
| |
* | Split `CrateImplDefs` in inherent and trait implsJonas Schievink2020-07-013-105/+110
| | | | | | | | | | | | This makes the intention of inherent vs. trait impls somewhat more clear and also fixes (?) an issue where trait impls with an unresolved trait were added as inherent impls instead (hence the test changes).
* | Don't recursively call `impls_from_deps`Jonas Schievink2020-07-011-11/+2
| | | | | | | | | | It creates a big map and duplicates lots of impls that are then left lying around
* | Use dynamic dispatch in AstDiagnosticLaurențiu Nicola2020-07-011-5/+5
|/
* Better factoringAleksey Kladov2020-06-302-9/+18
|
* Update the rest of the testsAleksey Kladov2020-06-297-438/+297
|
* (T): make typification tests more data drivenAleksey Kladov2020-06-294-133/+103
|
* Merge #5124bors[bot]2020-06-294-18/+92
|\ | | | | | | | | | | | | | | 5124: (Partially) fix handling of type params depending on type params r=matklad a=flodiebold If the first type parameter gets inferred, that's still not handled correctly; it'll require some more refactoring: E.g. if we have `Thing<T, F=fn() -> T>` and then instantiate `Thing<_>`, that gets turned into `Thing<_, fn() -> _>` before the `_` is instantiated into a type variable -- so afterwards, we have two type variables without any connection to each other. Co-authored-by: Florian Diebold <[email protected]>
| * (Partially) fix handling of type params depending on type paramsFlorian Diebold2020-06-294-18/+92
| | | | | | | | | | | | | | | | If the first type parameter gets inferred, that's still not handled correctly; it'll require some more refactoring: E.g. if we have `Thing<T, F=fn() -> T>` and then instantiate `Thing<_>`, that gets turned into `Thing<_, fn() -> _>` before the `_` is instantiated into a type variable -- so afterwards, we have two type variables without any connection to each other.
* | Simlify with matches!()Veetaha2020-06-282-13/+3
|/
* Simplify unsafe expr collection matchPaul Daniel Faria2020-06-271-4/+3
|
* Improve perf of finding unsafe exprsPaul Daniel Faria2020-06-271-49/+39
|
* Remove unneeded code, filename from tests, fix rebasing issuesPaul Daniel Faria2020-06-272-17/+5
|
* Remove track_parent and parent_map, replace with simple walk in missign ↵Paul Daniel Faria2020-06-271-19/+23
| | | | unsafe validator
* unsafe: Clean up, improve tracking, add debug_assertPaul Daniel Faria2020-06-272-72/+74
| | | | | | Move unsafe_expressions to unsafe_validation.rs, replace vec tracking of child exprs with inline macro, add debug assert to ensure tracked children match walked children exactly
* Add HighlightTag::Operator, use it for unsafe deref. Move unsafe validation ↵Paul Daniel Faria2020-06-274-48/+69
| | | | to its own file
* Track expr parents during lowering, use parent map when checking if unsafe ↵Paul Daniel Faria2020-06-272-12/+12
| | | | exprs are within unsafe blocks
* Address review comments, have MissingUnsafe diagnostic point to each unsafe ↵Paul Daniel Faria2020-06-273-25/+19
| | | | use, update tests
* Rename Expr::UnsafeBlock to Expr::UnsafePaul Daniel Faria2020-06-272-2/+2
|
* Track unsafe blocks, don't trigger missing unsafe diagnostic when unsafe ↵Paul Daniel Faria2020-06-274-16/+72
| | | | exprs within unsafe block
* Add missing self param to testPaul Daniel Faria2020-06-271-1/+1
|
* Remove UnnecessaryUnsafe diagnostic, Fix Expr::Call unsafe analysisPaul Daniel Faria2020-06-273-69/+21
|