Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Check patterns for type match recursively. | Dawer | 2021-05-19 | 2 | -2/+30 | |
| | ||||||
* | internal: Record mismatches of pattern types. | Dawer | 2021-05-19 | 1 | -1/+1 | |
| | ||||||
* | Fix false positive "Missing match arm". | Dawer | 2021-05-14 | 1 | -0/+1 | |
| | ||||||
* | Fix inference with conditionally compiled tails | Daniel McNab | 2021-05-03 | 1 | -1/+1 | |
| | | | | Fixes #8378 | |||||
* | decl_check: follow test style guide | Jonas Schievink | 2021-04-13 | 1 | -60/+59 | |
| | ||||||
* | address review feedback | Jade | 2021-04-13 | 1 | -21/+35 | |
| | ||||||
* | decl_check: consider outer scopes' allows | Jade | 2021-04-08 | 1 | -10/+122 | |
| | | | | | | | | | Fix #8417. Also makes it less noisy about no_mangle annotated stuff the user can do nothing about. Note: this still is broken with bitfield! macros. A repro in an ignore test is included here. I believe this bug is elsewhere, and I don't think I can work around it here. | |||||
* | infer: remove `record_field_resolutions` field | Jonas Schievink | 2021-04-06 | 1 | -5/+4 | |
| | | | | | It stores no useful data, since we can derive all fields from `variant_resolutions` | |||||
* | Move Ty accessors to TyExt | Lukas Wirth | 2021-04-06 | 2 | -2/+4 | |
| | ||||||
* | Add Lifetime to TyKind::Ref | Lukas Wirth | 2021-04-06 | 1 | -1/+1 | |
| | ||||||
* | Hide Binders internals more | Florian Diebold | 2021-04-05 | 1 | -1/+2 | |
| | ||||||
* | Add TyBuilder::unit() and TyExt::is_unit() | Florian Diebold | 2021-04-04 | 1 | -2/+2 | |
| | ||||||
* | Access a body's block def maps via a method | Jonas Schievink | 2021-04-04 | 1 | -2/+1 | |
| | ||||||
* | Use bitflags to compress function properties | Jonas Schievink | 2021-04-03 | 2 | -4/+4 | |
| | | | | Very minor savings, only 1 MB or so | |||||
* | Rename Ty::interned to Ty::kind | Florian Diebold | 2021-04-03 | 3 | -3/+3 | |
| | | | | ... since that's the actual method on Chalk side that matches the signature. | |||||
* | Introduce `GenericArg` like in Chalk | Florian Diebold | 2021-04-03 | 2 | -2/+7 | |
| | | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters. | |||||
* | Fix expansion of OR-patterns in match check | Jesse Bakker | 2021-03-30 | 1 | -25/+15 | |
| | ||||||
* | Fix infinite recursion when computing diagnostics for inner items | Jonas Schievink | 2021-03-18 | 1 | -1/+14 | |
| | ||||||
* | Improve test | Jonas Schievink | 2021-03-17 | 1 | -0/+21 | |
| | ||||||
* | Add test for `#[cfg]` on function params | Jonas Schievink | 2021-03-17 | 1 | -0/+13 | |
| | ||||||
* | Handle `#[cfg]` on call arguments | Jonas Schievink | 2021-03-17 | 1 | -0/+23 | |
| | ||||||
* | avoid converting types into themselves via .into() (clippy::useless-conversion) | Matthias Krüger | 2021-03-17 | 3 | -19/+19 | |
| | | | | example: let x: String = String::from("hello world").into(); | |||||
* | Introduce FunctionQualifier for hir::FunctionData | oxalica | 2021-03-15 | 2 | -4/+4 | |
| | ||||||
* | Use chalk_ir::FnDefId | Florian Diebold | 2021-03-13 | 1 | -1/+1 | |
| | ||||||
* | Separate `Ty` and `TyKind` like in Chalk | Florian Diebold | 2021-03-13 | 3 | -17/+16 | |
| | | | | | Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`. | |||||
* | Use `body.block_scopes` to validate inner items | Jonas Schievink | 2021-03-09 | 1 | -3/+8 | |
| | ||||||
* | Use upstream cov-mark | Laurențiu Nicola | 2021-03-08 | 1 | -7/+4 | |
| | ||||||
* | Use chalk_ir::AdtId | Lukas Wirth | 2021-03-04 | 2 | -9/+11 | |
| | ||||||
* | Introduce Ty::Alias | Lukas Wirth | 2021-03-01 | 1 | -1/+1 | |
| | ||||||
* | Inline TypeCtor into Ty | Lukas Wirth | 2021-02-28 | 3 | -16/+9 | |
| | ||||||
* | Update fixed tests | Jonas Schievink | 2021-02-10 | 1 | -15/+14 | |
| | ||||||
*-. | Merge #7570 #7571 | bors[bot] | 2021-02-05 | 1 | -160/+119 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7570: Add doc gen to the `generate_enum_match_method` assist r=yoshuawuyts a=yoshuawuyts Implements a small extension to https://github.com/rust-analyzer/rust-analyzer/pull/7562, generating default comments. I wasn't sure if this would fit the goals of Rust-Analyzer, so I chose to split it into a separate PR. This is especially useful when writing code in a codebase which uses `#![warn(missing_docs)]` lint, as many production-grade libraries do. The comments we're generating here are similar to the ones found on [`Option::is_some`](https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some) and [`Result::is_err`](https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err). I briefly considered only generating these for `pub` types, but they seem small and unobtrusive enough that they're probably useful in the general case. Thanks! ## Example __input__ ```rust pub(crate) enum Variant { Undefined, Minor, // cursor here Major, } ``` __output__ ```rust pub(crate) enum Variant { Undefined, Minor, Major, } impl Variant { /// Returns `true` if the variant is [`Minor`]. pub(crate) fn is_minor(&self) -> bool { matches!(self, Self::Minor) } } ``` ## Future Directions This opens up the path to adding an assist for generating these comments on existing `is_` methods. This would make it both easy to document new code, and update existing code with documentation. 7571: Cleanup decl_check r=Veykril a=Veykril bors r+ Co-authored-by: Yoshua Wuyts <[email protected]> Co-authored-by: Lukas Wirth <[email protected]> | |||||
| | * | Cleanup decl_check | Lukas Wirth | 2021-02-05 | 1 | -160/+119 | |
| |/ | ||||||
* / | Remove unnecessary allocs in case_conv | Lukas Wirth | 2021-02-05 | 1 | -18/+16 | |
|/ | ||||||
* | Classify function calls as functions when shadowed by types | Lukas Wirth | 2021-01-28 | 1 | -9/+3 | |
| | ||||||
* | Update tests to register the required standard library types | Phil Ellison | 2021-01-23 | 1 | -6/+10 | |
| | ||||||
* | Identify methods using functions ids rather than string names | Phil Ellison | 2021-01-23 | 1 | -7/+27 | |
| | ||||||
* | Implement fix, add tests | Phil Ellison | 2021-01-23 | 1 | -20/+7 | |
| | ||||||
* | Add diagnostic for filter_map followed by next | Phil Ellison | 2021-01-23 | 1 | -9/+61 | |
| | ||||||
* | prepare to publish el libro de arena | Aleksey Kladov | 2021-01-14 | 1 | -1/+1 | |
| | ||||||
* | Fixed typos in local bindings | Vincent Esche | 2021-01-09 | 1 | -2/+2 | |
| | ||||||
* | Fixed typos in code comments | Vincent Esche | 2021-01-09 | 1 | -2/+2 | |
| | ||||||
* | cargo fmt | Phil Ellison | 2021-01-07 | 1 | -6/+9 | |
| | ||||||
* | Add fix to wrap return expression in Some | Phil Ellison | 2021-01-07 | 1 | -6/+16 | |
| | ||||||
* | Don't emit arg count diagnostics for method calls with unknown receiver | Florian Diebold | 2021-01-01 | 1 | -1/+25 | |
| | | | | Fixes #7098. | |||||
* | decl_check: don't pass `db` around so often | Jonas Schievink | 2020-12-17 | 1 | -54/+49 | |
| | ||||||
* | Merge #6769 | bors[bot] | 2020-12-10 | 1 | -3/+36 | |
|\ | | | | | | | | | | | | | | | | | | | 6769: Add native "remove this semicolon" diagnostics r=matklad a=ivan770 Closes #6739 ![demo2](https://user-images.githubusercontent.com/14003886/101530533-b76c3180-399a-11eb-9d18-5c8457721655.gif) Co-authored-by: ivan770 <[email protected]> | |||||
| * | Cast to ExprStmt, style fixes | ivan770 | 2020-12-10 | 1 | -6/+5 | |
| | | ||||||
| * | Apply rustfmt changes | ivan770 | 2020-12-09 | 1 | -9/+8 | |
| | | ||||||
| * | Apply suggestions from code review | ivan770 | 2020-12-09 | 1 | -17/+20 | |
| | | | | | | Co-authored-by: bjorn3 <[email protected]> |