Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename ra_arena | Aleksey Kladov | 2020-08-12 | 13 | -13/+13 |
| | |||||
* | Merge #5553 | bors[bot] | 2020-08-12 | 1 | -1/+1 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5553: Add fix ranges for diagnostics r=matklad a=SomeoneToIgnore A follow-up of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Less.20red.20in.20the.20code Now diagnostics can apply fixes in a range that's different from the range used to highlight the diagnostics. Previous logic did not consider the fix range, having both ranges equal, which could cause a lot of red noise in the editor. Now, the fix range gets used with the fix, the diagnostics range is used for everything else which allows to improve the error highlighting. before: <img width="191" alt="image" src="https://user-images.githubusercontent.com/2690773/88590727-df9a6a00-d063-11ea-97ed-9809c1c5e6e6.png"> after: <img width="222" alt="image" src="https://user-images.githubusercontent.com/2690773/88590734-e1fcc400-d063-11ea-9b7c-25701cbd5352.png"> `MissingFields` and `MissingPatFields` diagnostics now have the fix range as `ast::RecordFieldList` of the expression with an error (as it was before this PR), and the diagnostics range as a `ast::Path` of the expression, if it's present (do you have any example of `ast::Expr::RecordLit` that has no path btw?). The rest of the diagnostics have both ranges equal, same as it was before this PR. Co-authored-by: Kirill Bulatov <[email protected]> | ||||
| * | Better naming and docs | Kirill Bulatov | 2020-08-11 | 1 | -1/+1 |
| | | |||||
| * | Move the DiagnosticsWithFix trait on the ide level | Kirill Bulatov | 2020-08-11 | 1 | -9/+1 |
| | | |||||
| * | Make the fix AST source Optional | Kirill Bulatov | 2020-08-11 | 1 | -5/+5 |
| | | |||||
| * | Refactor the diagnostics | Kirill Bulatov | 2020-08-11 | 1 | -2/+10 |
| | | |||||
| * | Require source implementations for Diagnostic | Kirill Bulatov | 2020-08-11 | 1 | -1/+1 |
| | | |||||
| * | Better naming | Kirill Bulatov | 2020-08-11 | 1 | -1/+1 |
| | | |||||
* | | Move unsafe packed ref logic to Semantics, use `Attrs::by_key` to simplify ↵ | Paul Daniel Faria | 2020-08-10 | 1 | -22/+3 |
| | | | | | | | | repr attr lookup | ||||
* | | Revert function structs back to using bool to track self param, use first ↵ | Paul Daniel Faria | 2020-08-10 | 3 | -16/+7 |
| | | | | | | | | param for self information in syntax highlighting instead | ||||
* | | Unsafe borrow of packed fields: account for borrow through ref binding, auto ↵ | Paul Daniel Faria | 2020-08-10 | 3 | -7/+16 |
| | | | | | | | | ref function calls | ||||
* | | Cleanup repr check, fix packed repr check and test | Paul Daniel Faria | 2020-08-10 | 1 | -3/+8 |
| | | |||||
* | | Add tracking of packed repr, use it to highlight unsafe refs | Paul Daniel Faria | 2020-08-10 | 1 | -4/+52 |
|/ | | | | | | Taking a reference to a misaligned field on a packed struct is an unsafe operation. Highlight that behavior. Currently, the misaligned part isn't tracked, so this highlight is a bit too aggressive. | ||||
* | Update grammar | Aleksey Kladov | 2020-08-01 | 1 | -3/+3 |
| | |||||
* | Finish rename | Aleksey Kladov | 2020-07-31 | 1 | -3/+3 |
| | |||||
* | Unify naming of tuple fields | Aleksey Kladov | 2020-07-31 | 1 | -3/+3 |
| | |||||
* | Rename DotDotPat -> RestPat | Aleksey Kladov | 2020-07-31 | 1 | -3/+3 |
| | |||||
* | Rename | Aleksey Kladov | 2020-07-31 | 1 | -2/+2 |
| | |||||
* | Rename BindPat -> IdentPat | Aleksey Kladov | 2020-07-31 | 1 | -1/+1 |
| | |||||
* | Rename PalceholderPat -> WildcardPat | Aleksey Kladov | 2020-07-31 | 1 | -1/+1 |
| | |||||
* | Reorder | Aleksey Kladov | 2020-07-31 | 1 | -1/+0 |
| | |||||
* | Allign RecordPat with RecordExpr | Aleksey Kladov | 2020-07-31 | 1 | -21/+18 |
| | |||||
* | Fix GenericArgs grammar | Aleksey Kladov | 2020-07-31 | 1 | -19/+23 |
| | |||||
* | Rename TypeArgList -> GenericArgList | Aleksey Kladov | 2020-07-31 | 3 | -4/+4 |
| | |||||
* | Minor | Aleksey Kladov | 2020-07-31 | 1 | -3/+0 |
| | |||||
* | Rename LambdaExpr -> ClosureExpr | Aleksey Kladov | 2020-07-31 | 1 | -1/+1 |
| | |||||
* | Work on expressions grammar | Aleksey Kladov | 2020-07-31 | 1 | -5/+17 |
| | |||||
* | Item is a Stmt | Aleksey Kladov | 2020-07-31 | 1 | -10/+20 |
| | |||||
* | Finalize TypeBound grammar | Aleksey Kladov | 2020-07-31 | 1 | -1/+1 |
| | |||||
* | "Finalize" Types grammar | Aleksey Kladov | 2020-07-31 | 1 | -1/+0 |
| | | | | | | | Note that `for` type is rust-analyzer's own invention. Both the reference and syn allow `for` only for fnptr types, and we allow them everywhere. This needs to be checked with respect to type bounds grammar... | ||||
* | Reame PlaceholderType -> InferType | Aleksey Kladov | 2020-07-31 | 1 | -1/+1 |
| | |||||
* | Rename TypeRef -> Type | Aleksey Kladov | 2020-07-31 | 4 | -20/+20 |
| | | | | | | | | | | The TypeRef name comes from IntelliJ days, where you often have both type *syntax* as well as *semantical* representation of types in scope. And naming both Type is confusing. In rust-analyzer however, we use ast types as `ast::Type`, and have many more semantic counterparts to ast types, so avoiding name clash here is just confusing. | ||||
* | Use ty to access most TypeRefs | Aleksey Kladov | 2020-07-30 | 5 | -17/+15 |
| | |||||
* | Remove TypeAscriptionOwner | Aleksey Kladov | 2020-07-30 | 6 | -20/+15 |
| | |||||
* | Finalize attribute grammar | Aleksey Kladov | 2020-07-30 | 1 | -11/+8 |
| | |||||
* | Finaize item grammar | Aleksey Kladov | 2020-07-30 | 1 | -0/+1 |
| | |||||
* | Finalize impl Grammar | Aleksey Kladov | 2020-07-30 | 5 | -10/+10 |
| | |||||
* | Finalize Trait grammar | Aleksey Kladov | 2020-07-30 | 6 | -12/+12 |
| | |||||
* | Finalize const&static grammar | Aleksey Kladov | 2020-07-30 | 5 | -17/+17 |
| | |||||
* | Rename EnumVariant -> Variant | Aleksey Kladov | 2020-07-30 | 4 | -6/+6 |
| | |||||
* | Rename EnumDef -> Enum | Aleksey Kladov | 2020-07-30 | 6 | -9/+9 |
| | |||||
* | Rename StructDef -> Struct | Aleksey Kladov | 2020-07-30 | 5 | -10/+10 |
| | |||||
* | Finalize union grammar | Aleksey Kladov | 2020-07-30 | 5 | -8/+8 |
| | |||||
* | Rename FieldDef -> Field | Aleksey Kladov | 2020-07-30 | 3 | -19/+20 |
| | |||||
* | Rename RecordLit -> RecordExpr | Aleksey Kladov | 2020-07-30 | 2 | -4/+4 |
| | |||||
* | Rename TypeParamList -> GenericParamList | Aleksey Kladov | 2020-07-30 | 2 | -7/+7 |
| | |||||
* | Rename TypeAliasDef -> TypeAlias | Aleksey Kladov | 2020-07-30 | 5 | -9/+9 |
| | |||||
* | Rename FnDef -> Fn | Aleksey Kladov | 2020-07-30 | 5 | -21/+21 |
| | |||||
* | Update tests | Aleksey Kladov | 2020-07-30 | 1 | -2/+2 |
| | |||||
* | Rename UseItem -> Use | Aleksey Kladov | 2020-07-30 | 4 | -7/+7 |
| |