Commit Graph

126 Commits

Author SHA1 Message Date
hkalbasi
d5c7ec499a fix stack overflow in is_ty_uninhabited_from 2023-03-28 15:45:35 +03:30
bors
5bba438c9c Auto merge of #14366 - Veykril:linked-proj, r=Veykril
feat: Pop a notification prompting the user to add a Cargo.toml of unlinked file to the linkedProjects

cc https://github.com/rust-lang/rust-analyzer/issues/13226 https://github.com/rust-lang/rust-analyzer/issues/9661
2023-03-28 07:05:43 +00:00
Lukas Wirth
ee02213e65 Handle proc macro fetching via OpQueue 2023-03-26 09:33:41 +02:00
hkalbasi
9ad83deecc Support overloaded index MIR lowering 2023-03-17 19:10:25 +03:30
hkalbasi
eb4939e217 Support overloaded deref MIR lowering 2023-03-17 14:02:55 +03:30
hkalbasi
a063f000ff Support function pointer MIR lowering 2023-03-17 13:08:35 +03:30
Lukas Wirth
66636939a6 feat: Pop a notification prompting the user to add a Cargo.toml of unlinked file to the linkedProjects 2023-03-16 16:26:19 +01:00
XFFXFF
0c935732bc do not offer fixit for macro expansions and refactor the code 2023-03-15 09:12:40 +08:00
XFFXFF
bf0322cd0c pick the best ancestor expr of unsafe expr to add unsafe block. Thanks! @Veykril 2023-03-15 09:07:11 +08:00
XFFXFF
82780d8caf feat: add an autofix for inserting an unsafe block to missing unsafe diagnostic 2023-03-15 09:07:11 +08:00
Lukas Wirth
f34b2469bd lint incoherent inherent impls 2023-03-14 19:20:44 +01:00
Lukas Wirth
1a9fbf0a6d fix: Fix visibility resolution not respecting parent blocks 2023-03-14 13:42:08 +01:00
bors
6a98e961f8 Auto merge of #14340 - Veykril:expand, r=lnicola
internal: Rename AstDatabase to ExpandDatabase
2023-03-14 09:37:54 +00:00
hkalbasi
d7da9e64d1 Add storage dead for let bindings without initializer 2023-03-14 12:15:16 +03:30
Lukas Wirth
9fb9ee3b6a internal: Rename AstDatabase to ExpandDatabase 2023-03-13 16:35:41 +01:00
bors
70e10deee8 Auto merge of #14326 - iDawer:refactor, r=Veykril
internal: Rename `hir::diagnostics::MissingMatchArms.match_expr` field

`hir::diagnostics::MissingMatchArms.match_expr` had confusing name: it is pointing to scrutinee expression. Renamed to `scrutinee_expr` and used better fitting type for it.

Also small refactorings/cleanup.
2023-03-11 07:36:00 +00:00
iDawer
5e8c586f3b Refactor hir::diagnostics::MissingMatchArms fields, better naming 2023-03-10 18:22:32 +05:00
hkalbasi
a980b562a7 Fix stack overflow when derefrencing &! 2023-03-10 13:44:34 +03:30
hkalbasi
8593132a43 fix block with no termination in or patterns 2023-03-09 22:32:12 +03:30
bors
ecc32c2f85 Auto merge of #14271 - Veykril:ty-diag-err, r=Veykril
Don't trigger unresolved method/field diagnostics on types containing errors
2023-03-07 14:25:20 +00:00
Lukas Wirth
d45708fabe Don't trigger unresolved method/field diagnostics on types containing errors 2023-03-07 15:24:43 +01:00
bors
44ff3c407a Auto merge of #14232 - HKalbasi:mir, r=Veykril
MIR episode 2

This PR adds:
1. `need-mut` and `unused-mut` diagnostics
2. `View mir` command which shows MIR for the body under cursor, useful for debugging
3. MIR lowering for or-patterns and for-loops
2023-03-07 09:49:49 +00:00
hkalbasi
bcd7ecb242 Add profiling to mir lower and borrowck query 2023-03-07 12:42:52 +03:30
Lukas Wirth
34a3187ee8 internal: Mark unresolved field, unresolved method and expected function diagnostics experimental 2023-03-06 22:24:38 +01:00
hkalbasi
2cce9dc3e9 Make unused_mut diagnostic experimental 2023-03-06 21:09:09 +03:30
hkalbasi
af90ec8096 Partially support "overloaded deref" MIR lowering 2023-03-06 21:09:09 +03:30
hkalbasi
bf0f99f15d Fix overloaded deref unused mut false positive 2023-03-06 21:09:09 +03:30
hkalbasi
6377d50bd1 Support "for loop" MIR lowering 2023-03-06 21:09:09 +03:30
hkalbasi
ac04bfd7a7 Add View Mir command and fix some bugs 2023-03-06 21:09:09 +03:30
hkalbasi
a25710b0c0 Add need-mut and unused-mut diagnostics 2023-03-06 21:09:08 +03:30
Lukas Wirth
29150c2315 Disable pattern type mismatches again 2023-03-03 22:41:41 +01:00
Lukas Wirth
e7485a0416 Diagnose unresolved method calls 2023-03-03 20:43:13 +01:00
Lukas Wirth
78b2dd813a Diagnose unresolved field accesses 2023-03-03 20:43:10 +01:00
Lukas Wirth
3c7a0aa00e Diagnose call expression on non-callable things 2023-03-03 20:43:05 +01:00
Lukas Wirth
41f234df09 Diagnose value breaks in incorrect breakables 2023-03-03 17:28:57 +01:00
bors
c229a836e8 Auto merge of #14222 - Veykril:pat-mismatch-diags, r=Veykril
Show pattern mismatch diagnostics
2023-03-03 10:33:54 +00:00
Lukas Wirth
522823f610 Fix text fixtures of missing_match_arms diagnostics 2023-03-03 11:13:06 +01:00
Lukas Wirth
44e2c6ea92 Don't emit two type mismatches for literal pattern mismatches 2023-03-03 10:42:49 +01:00
Lukas Wirth
fc2b395e00 Show pattern mismatch diagnostics 2023-03-03 10:41:44 +01:00
Ryo Yoshida
943de55214
Fix typo 2023-03-03 01:12:39 +09:00
Ryo Yoshida
83e24fec98
Fix associated item visibility in block-local impls 2023-02-19 23:55:55 +09:00
bors
fa874627f0 Auto merge of #13969 - Veykril:workspace.dependencies, r=Veykril
Use workspace.dependencies to declare local dependencies
2023-01-17 10:29:27 +00:00
Lukas Wirth
bed4db3c62 Use workspace.dependencies to declare local dependencies 2023-01-17 10:52:26 +01:00
Lukas Wirth
e4858fe480 Specify authors, edition and license via workspace.package 2023-01-16 16:44:00 +01:00
Lukas Wirth
679df2adf1 Specify rust-version via workspace.package 2023-01-16 16:33:01 +01:00
Lukas Wirth
14777ce751 fix indentation of unlinked_file quickfix 2023-01-12 11:24:44 +01:00
Lukas Wirth
5214a98d9c Simplify 2023-01-11 23:04:35 +01:00
Lukas Wirth
1ce3e820dc feat: Make unlinked_file diagnostic quickfixes work for inline modules 2023-01-11 22:39:05 +01:00
Daniel Eades
ac3844a0bb a number of code simplifications 2023-01-10 18:48:51 +00:00
Daniel Eades
ed128872eb remove needless borrows 2023-01-02 14:52:32 +00:00