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
Lukas Wirth
eee7de0225
Diagnose private assoc item accesses
2023-01-01 13:24:48 +01:00
Lukas Wirth
e3d144d17f
Diagnose private field accesses
2022-12-31 14:20:59 +01:00
bors
0d76b94c90
Auto merge of #13866 - Nilstrieb:rustc_safe_intrinsic, r=Veykril
...
Use `rustc_safe_intrinsic` attribute to check for intrinsic safety
Instead of maintaining a list that is poorly kept in sync we can just use the attribute.
This will make new RA versions unusable with old toolchains that don't have the attribute yet. Should we keep maintaining the list as a fallback or just don't care?
2022-12-30 22:14:31 +00:00
Nilstrieb
72afcf2cad
Use rustc_safe_intrinsic
attribute to check for intrinsic safety
...
Instead of maintaining a list that is poorly kept in sync we can just
use the attribute.
2022-12-30 20:29:37 +01:00
Maybe Waffle
ef303f224f
Actually test closures in closures_are_borders
2022-12-28 20:56:58 +00:00
Maybe Waffle
797da9e8da
Actually test async{}
blocks in async_blocks_are_borders
2022-12-28 20:56:58 +00:00
Maybe Waffle
eecab99dec
Allow break
and co to go through try{}
blocks
2022-12-28 20:56:58 +00:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Yuri Astrakhan
e341e996f7
Clippy-fix explicit auto-deref
...
Seems like these can be safely fixed. With one, I was particularly
surprised -- `Some(pats) => &**pats,` in body.rs?
```
cargo clippy --fix -- -A clippy::all -D clippy::explicit_auto_deref
```
2022-12-23 02:52:14 -05:00
Yuri Astrakhan
1d59c7b667
Remove non-needed clones
...
I am not certain if this will improve performance,
but it seems having a .clone() without any need should be removed.
This was done with clippy, and manually reviewed:
```
cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone
```
2022-12-23 02:20:03 -05:00
Lukas Wirth
dc8254c6ab
fix: Fix nested macro diagnostics pointing at macro expansion files
2022-11-19 10:32:32 +01:00
Ryo Yoshida
19306c070d
Fix tests that depended on loose visibility restriction
2022-11-11 20:31:46 +09:00
Lukas Wirth
ffd7bf8bf9
Bump Cargo rust-version fields to latest stable
2022-11-07 12:59:51 +01:00
Lukas Wirth
8047512dca
Revert "feat: Diagnose some incorrect usages of the question mark operator"
2022-10-18 14:18:59 +02:00
Lukas Wirth
381366f1dd
Diagnose incorrect usages of the question mark operator
2022-10-16 12:58:24 +02:00
Laurențiu Nicola
cbce0cda08
Bump anyhow, arbitrary, itertools, semver, serde
2022-10-15 12:52:34 +03:00
unexge
b21bf25a07
Collect diagnostics in queries instead of nameres
2022-09-26 19:06:29 +01:00
unexge
89107d5469
Emit unconfigured code diagnostics for fields
2022-09-26 19:04:57 +01:00
Mathew Horner
a65ca20210
Fix tests by using primitive rather than String.
2022-09-16 16:56:19 -05:00
Mathew Horner
e7abf34c19
Fix add reference action on macros.
2022-09-15 20:25:29 -05:00
Lukas Wirth
a8ecaa1979
Restructure find_path
into a separate functions for modules and non-module items
...
Also renames `prefer_core` imports config to `prefer_no_std` and changes the behavior of no_std path searching by preferring `core` paths `over` alloc
2022-09-13 15:15:27 +02:00
Lukas Wirth
7d19971666
Add config to unconditionally prefer core imports over std
...
Fixes https://github.com/rust-lang/rust-analyzer/issues/12979
2022-09-09 20:04:56 +02:00
bors
4f8153e4a5
Auto merge of #13167 - iDawer:exhaustive_patterns, r=Veykril
...
feat: Implement `feature(exhaustive_patterns)` from unstable Rust
Closes #12753
Recognize Rust's unstable `#![feature(exhaustive_patterns)]` (RFC 1872). Allow omitting visibly uninhabited variants from `match` expressions when the feature is on.
This adjusts match checking to the current implementation of the postponed RFC 1872 in rustc.
2022-09-02 12:32:36 +00:00
Lukas Wirth
8110119fef
Properly handle break resolution inside non-breakable expressions
2022-09-01 14:54:47 +02:00
Lukas Wirth
1e66a5a8ce
Diagnose incorrect continue expressions
2022-09-01 14:41:38 +02:00
iDawer
1a580a3396
Implement unstable RFC 1872 exhaustive_patterns
2022-08-31 20:17:54 +05:00
bors
dea163970a
Auto merge of #12965 - DesmondWillowbrook:assoc-method-dimming, r=Veykril
...
feat: make trait assoc items become inactive due to cfg
fixes #12394
2022-08-22 07:20:56 +00:00
Kartavya Vashishtha
87b779756c
make impl and trait inactive diagnostics work
2022-08-20 13:28:43 +05:30
Dezhi Wu
23747419ca
fix: a bunch of typos
...
This PR will fix some typos detected by [typos].
There are also some other typos in the function names, variable names, and file
names, which I leave as they are. I'm more certain that typos in comments
should be fixed.
[typos]: https://github.com/crate-ci/typos
2022-08-17 21:44:58 +08:00
Lukas Wirth
1bb58205f0
Fix panic in no_such_field when using tuple fields on record structs
2022-08-11 10:41:30 +02:00
Kartavya Vashishtha
1883d1f141
activate assoc item test
2022-08-07 20:39:11 +05:30
hkalbasi
851f6db7f7
Import serde derives on converting json to struct
2022-08-06 20:12:21 +04:30
hkalbasi
c1a175f61e
Generate rust type from json
2022-07-29 20:06:01 +04:30