aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/expr.rs
Commit message (Collapse)AuthorAgeFilesLines
* Basic lowering hir_def::exrp::Pat -> typed HIR.Dawer2021-05-311-9/+30
| | | | Pattern arena is broken
* Implement struct ctor applicationDawer2021-05-311-1/+1
|
* Remove unneeded indirection on PatCtxtDawer2021-05-311-2/+2
|
* Enable generation of non-exhaustiveness witnessesDawer2021-05-311-1/+2
|
* Update match checking.Dawer2021-05-311-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fn is_useful , more skeletons Specify a lifetime on pattern references impl PatStack fill impl Matrix PatStack::pop_head_constructor Index-based approach struct PatCtxt fields construction fn Fields::wildcards split wildcard fn Constructor::is_covered_by_any(..) fn Matrix::specialize_constructor(..) impl Usefulness Initial work on witness construction Reorganize files Replace match checking diagnostic Handle types of expanded patterns unit match checking go brrr
* internal: move diagnostics to hirAleksey Kladov2021-05-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | The idea here is to eventually get rid of `dyn Diagnostic` and `DiagnosticSink` infrastructure altogether, and just have a `enum hir::Diagnostic` instead. The problem with `dyn Diagnostic` is that it is defined in the lowest level of the stack (hir_expand), but is used by the highest level (ide). As a first step, we free hir_expand and hir_def from `dyn Diagnostic` and kick the can up to `hir_ty`, as an intermediate state. The plan is then to move DiagnosticSink similarly to the hir crate, and, as final third step, remove its usage from the ide. One currently unsolved problem is testing. You can notice that the test which checks precise diagnostic ranges, unresolved_import_in_use_tree, was moved to the ide layer. Logically, only IDE should have the infra to render a specific range. At the same time, the range is determined with the data produced in hir_def and hir crates, so this layering is rather unfortunate. Working on hir_def shouldn't require compiling `ide` for testing.
* Record method call substs and use them in call infoFlorian Diebold2021-05-231-8/+4
|
* Add last remaining module docstringFlorian Diebold2021-05-221-1/+3
|
* Check patterns for type match recursively.Dawer2021-05-191-2/+18
|
* internal: Record mismatches of pattern types.Dawer2021-05-191-1/+1
|
* Fix inference with conditionally compiled tailsDaniel McNab2021-05-031-1/+1
| | | | Fixes #8378
* infer: remove `record_field_resolutions` fieldJonas Schievink2021-04-061-5/+4
| | | | | It stores no useful data, since we can derive all fields from `variant_resolutions`
* Add Lifetime to TyKind::RefLukas Wirth2021-04-061-1/+1
|
* Hide Binders internals moreFlorian Diebold2021-04-051-1/+2
|
* Add TyBuilder::unit() and TyExt::is_unit()Florian Diebold2021-04-041-2/+2
|
* Rename Ty::interned to Ty::kindFlorian Diebold2021-04-031-1/+1
| | | | ... since that's the actual method on Chalk side that matches the signature.
* Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-031-1/+3
| | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* Improve testJonas Schievink2021-03-171-0/+21
|
* Add test for `#[cfg]` on function paramsJonas Schievink2021-03-171-0/+13
|
* Handle `#[cfg]` on call argumentsJonas Schievink2021-03-171-0/+23
|
* avoid converting types into themselves via .into() (clippy::useless-conversion)Matthias Krüger2021-03-171-9/+9
| | | | example: let x: String = String::from("hello world").into();
* Separate `Ty` and `TyKind` like in ChalkFlorian Diebold2021-03-131-11/+10
| | | | | Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
* Use chalk_ir::AdtIdLukas Wirth2021-03-041-6/+8
|
* Inline TypeCtor into TyLukas Wirth2021-02-281-7/+4
|
* Update tests to register the required standard library typesPhil Ellison2021-01-231-6/+10
|
* Identify methods using functions ids rather than string namesPhil Ellison2021-01-231-7/+27
|
* Implement fix, add testsPhil Ellison2021-01-231-20/+7
|
* Add diagnostic for filter_map followed by nextPhil Ellison2021-01-231-9/+61
|
* Fixed typos in local bindingsVincent Esche2021-01-091-2/+2
|
* cargo fmtPhil Ellison2021-01-071-6/+9
|
* Add fix to wrap return expression in SomePhil Ellison2021-01-071-6/+16
|
* Don't emit arg count diagnostics for method calls with unknown receiverFlorian Diebold2021-01-011-1/+25
| | | | Fixes #7098.
* Cast to ExprStmt, style fixesivan7702020-12-101-6/+5
|
* Apply rustfmt changesivan7702020-12-091-9/+8
|
* Apply suggestions from code reviewivan7702020-12-091-17/+20
| | | Co-authored-by: bjorn3 <[email protected]>
* Format codeivan7702020-12-081-4/+13
|
* Remove use via superivan7702020-12-081-3/+1
|
* Remove this semicolonivan7702020-12-081-1/+26
|
* Deny unreachable-pubAleksey Kladov2020-11-021-11/+4
| | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
* Fix missing match arm false error on unknown typeCAD972020-08-171-2/+2
|
* Rename ra_hir_ty -> hir_tyAleksey Kladov2020-08-131-0/+569