aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
Commit message (Collapse)AuthorAgeFilesLines
* internal: add fn to minicoreAleksey Kladov2021-06-163-304/+228
|
* internal: add result to minicoreAleksey Kladov2021-06-151-19/+1
|
* internal: add option to minicoreAleksey Kladov2021-06-151-40/+6
|
* internal: add future to minicoreAleksey Kladov2021-06-151-12/+2
|
* internal: switch some tests to minicoreAleksey Kladov2021-06-153-70/+59
|
* internal: switch some tests to minicoreAleksey Kladov2021-06-152-55/+32
|
* internal: add ranges to minicoreAleksey Kladov2021-06-151-27/+1
|
* internal: unindent some testsAleksey Kladov2021-06-151-255/+252
|
* internal: switch some tests to minicoreAleksey Kladov2021-06-152-111/+102
|
* internal: switch some tests to minicoreAleksey Kladov2021-06-152-59/+50
|
* internal: switch some tests to minicoreAleksey Kladov2021-06-151-181/+129
|
* internal: switch some tests to minicoreAleksey Kladov2021-06-151-116/+81
|
* internal: introduce minicore -- a subset of libcore for testingAleksey Kladov2021-06-151-28/+19
|
* Merge #9278bors[bot]2021-06-152-10/+26
|\ | | | | | | | | | | | | | | 9278: internal: document that we don't #[ignore] tests r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * internal: document that we don't #[ignore] testsAleksey Kladov2021-06-152-10/+26
| |
* | internal: don't pull tracing via chalkAleksey Kladov2021-06-141-1/+1
|/
* Merge #9260bors[bot]2021-06-144-6/+6
|\ | | | | | | | | | | | | | | 9260: tree-wide: make rustdoc links spiky so they are clickable r=matklad a=lf- Rustdoc was complaining about these while I was running with --document-private-items and I figure they should be fixed. Co-authored-by: Jade <[email protected]>
| * tree-wide: make rustdoc links spiky so they are clickableJade2021-06-144-6/+6
| |
* | internal: use cov-mark rather than bailing out diagnosticAleksey Kladov2021-06-131-14/+3
| |
* | internal: refactor incorrect case diagnosticsAleksey Kladov2021-06-131-3/+0
| |
* | Merge #9246bors[bot]2021-06-131-11/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 9246: internal: unified missing fields diagnostic r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | internal: unified missing fields diagnosticAleksey Kladov2021-06-131-11/+7
| | |
* | | Merge #9244bors[bot]2021-06-134-36/+138
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 9244: feat: Make block-local trait impls work r=flodiebold a=flodiebold As long as either the trait or the implementing type are defined in the same block. CC #8961 Co-authored-by: Florian Diebold <[email protected]>
| * | Make block-local trait impls workFlorian Diebold2021-06-134-36/+138
| | | | | | | | | | | | | | | As long as either the trait or the implementing type are defined in the same block.
* | | minor: put a mark backAleksey Kladov2021-06-131-0/+1
|/ /
* | cargo fmtMaan20032021-06-132-9/+2
| |
* | clippy::redundant_field_namesMaan20032021-06-131-1/+1
| |
* | clippy::redundant_closureMaan20032021-06-134-5/+5
| |
* | clippy::useless_conversionMaan20032021-06-131-1/+1
| |
* | clippy::redudant_borrowMaan20032021-06-1310-29/+29
| |
* | Merge #9239bors[bot]2021-06-125-54/+183
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 9239: fix: Fix coercion in match with expected type r=flodiebold a=flodiebold Plus add infrastructure to test type mismatches without expect. CC #8961 Co-authored-by: Florian Diebold <[email protected]>
| * | Fix coercion in match with expected typeFlorian Diebold2021-06-125-54/+183
| | | | | | | | | | | | Plus add infrastructure to test type mismatches without expect.
* | | internal: cross-crate cov-marksAleksey Kladov2021-06-122-1/+3
|/ /
* | internal: move diagnostics infra to hirAleksey Kladov2021-06-124-612/+13
| |
* | Move some hir_ty diagnostics to hirAleksey Kladov2021-06-124-1763/+97
| |
* | minor: reduce visibilityAleksey Kladov2021-06-121-3/+2
| |
* | internal: move missing unsafe diagnostic to hirAleksey Kladov2021-06-123-162/+21
| |
* | internal: move inference diagnostics to hirAleksey Kladov2021-06-123-239/+10
|/
* Set enable_proc_attr_macros in hir_ty TestDBJonas Schievink2021-06-031-1/+9
|
* Merge #9104bors[bot]2021-06-032-1/+64
|\ | | | | | | | | | | | | | | | | | | | | 9104: Implement `#[rustc_skip_array_during_method_dispatch]` r=flodiebold a=jonas-schievink haxx run the world Closes https://github.com/rust-analyzer/rust-analyzer/issues/8552 Part of https://github.com/rust-analyzer/rust-analyzer/issues/9056 Co-authored-by: Jonas Schievink <[email protected]>
| * Implement `#[rustc_skip_array_during_method_dispatch]`Jonas Schievink2021-06-012-1/+64
| |
* | Merge #9105bors[bot]2021-06-035-15/+50
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9105: internal: calculate pattern adjustments r=flodiebold a=iDawer This extends `InferenceResult` with `pub pat_adjustments: FxHashMap<PatId, Vec<Ty>>`. Fixes #9095 Co-authored-by: Dawer <[email protected]>
| * | internal: implement pattern adjustments.Dawer2021-06-013-2/+35
| | |
| * | minor: Avoid eprintln on panicDawer2021-06-012-13/+15
| | |
* | | Fix bind patterns always being treated as ref taking patternsLukas Wirth2021-06-022-19/+32
| |/ |/|
* | Implement per-edition preludesJonas Schievink2021-06-015-44/+97
|/
* Merge #8717bors[bot]2021-05-316-805/+2768
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8717: Update match checking algorithm r=iDawer a=iDawer I've recently got interest in the match checking to extend the current algo to support reporting witnesses of non-exhaustiveness. It appears the algo is outdated from rustc's implementation. I decided to rewrite it based on the latest rustc's version. It is a diff-based port to ra codebase. That means you can diff-compare these files to rustc. I'm striving to keep minimal ra-related changes in the algo to make it easier to backport future changes from the upstream. Based on upstream algorithm of version rust-lang/rust 1.52.0-nightly (25c15cdbe 2021-04-22) https://github.com/rust-lang/rust/blob/25c15cdbe/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs The goal of this PR is to cover the current `missing-match-arm` diagnostic. What is remaining to do: - [x] Error handling. The errors that are unrelated to match checking will be handled before the check. Just like how it made in rustc. - [x] Lowering `hir_def::expr::Pat` to `hir_ty::diagnostics::match_check::Pat`. rustc's match checking works on top of `rustc_mir_build::thir::Pat`, which is lowered from `hir::Pat` and carries some extra semantics used by the check. All unrelated checks are done there. RA could use this to rule out running the check on unimplemented cases (`Pat::ConstBlock`, etc). - [x] ~~Proper~~Loose typecheck of match arm patterns (https://github.com/rust-analyzer/rust-analyzer/pull/8840, https://github.com/rust-analyzer/rust-analyzer/pull/8875). - [x] Tests from `hir_ty::diagnostics::match_check::tests`. - [x] Clean up `todo`s - [x] Test run on real repos https://github.com/rust-analyzer/rust-analyzer/pull/8717#issuecomment-847120265. Co-authored-by: Dawer <[email protected]>
| * Expand fixme commentsDawer2021-05-313-2/+5
| |
| * fix: panic on extra fields in a patternDawer2021-05-311-0/+25
| |
| * Correct binding pattern's type; handle invalid records.Dawer2021-05-311-5/+55
| |