Commit Graph

7981 Commits

Author SHA1 Message Date
Armin Sander
8fc254597f Sophisticate Windows path encoding 2020-08-14 02:03:54 +02:00
Aleksey Kladov
9664c57e60 Make hygiene private to hir 2020-08-13 23:54:37 +02:00
bors[bot]
9930ef2536
Merge #5753
5753: Remove Hygiene from completion
 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-13 20:42:36 +00:00
Aleksey Kladov
86f89d9b31 Remove Hygiene from completion 2020-08-13 22:41:55 +02:00
Benjamin Coenen
947a27b797 display correctly 'impl Trait<T> + Trait<T>' #4814
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-08-13 22:13:34 +02:00
Aleksey Kladov
ef462ed6af Better recovery in use foo::; 2020-08-13 18:50:21 +02:00
Aleksey Kladov
0e1cda3079 Minor 2020-08-13 18:17:53 +02:00
Aleksey Kladov
6bc2633c90 Align parser names with grammar 2020-08-13 17:59:27 +02:00
Aleksey Kladov
1b0c7701cc Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
Aleksey Kladov
fc34403018 Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
Aleksey Kladov
ae3abd6e57 Rename ra_ssr -> ssr 2020-08-13 17:02:44 +02:00
Aleksey Kladov
bb5c189b7d Rename ra_ide_db -> ide_db 2020-08-13 16:39:16 +02:00
Aleksey Kladov
ae71a631fd Rename ra_hir -> hir 2020-08-13 16:36:55 +02:00
Aleksey Kladov
6a77ec7bbe Rename ra_hir_ty -> hir_ty 2020-08-13 16:35:29 +02:00
Aleksey Kladov
b28c54a2c2 Rename ra_hir_def -> hir_def 2020-08-13 16:29:33 +02:00
Aleksey Kladov
b7aa4898e0 Rename ra_hir_expand -> hir_expand 2020-08-13 16:29:33 +02:00
Aleksey Kladov
ed20a857f4 Rename ra_db -> base_db 2020-08-13 16:29:33 +02:00
bors[bot]
902f74c269
Merge #5746
5746: Structured search replace now handles UFCS calls to trait methods r=matklad a=davidlattimore



Co-authored-by: David Lattimore <dml@google.com>
2020-08-13 14:21:35 +00:00
Aleksey Kladov
2119dc23e8 Rename ra_proc_macro -> proc_macro_api 2020-08-13 12:39:27 +02:00
David Lattimore
3100de842b Structured search replace now handles UFCS calls to trait methods 2020-08-13 20:24:55 +10:00
bors[bot]
4abdf323af
Merge #5732
5732: Consider only IdentPats for param name hints r=matklad a=SomeoneToIgnore

Closes https://github.com/rust-analyzer/rust-analyzer/issues/4960

Avoid displaying any param name hints like 
<img width="590" alt="image" src="https://user-images.githubusercontent.com/2690773/90071461-47a4ad80-dcfe-11ea-9330-fb4f4e2d1b71.png">

Those hints seem to occupy plenty of space for no apparent benefit, with their destructured content not used in the code with the function hints.

I'm not entirely sure if we should show something else than `IdentPat`s, since I don't understand some of the `Pat` variant meanings:
a1c187eef3/crates/syntax/src/ast/generated/nodes.rs (L1336-L1352)

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-08-13 10:20:59 +00:00
bors[bot]
de1d93455f
Merge #5744
5744: Rename ra_project_model -> project_model r=matklad a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-08-13 10:10:03 +00:00
Pavan Kumar Sunkara
eac24d52e6 Rename ra_project_model -> project_model 2020-08-13 12:05:30 +02:00
Aleksey Kladov
c81f6230da Remove ra_fmt crate 2020-08-13 11:59:42 +02:00
Aleksey Kladov
479235ff0b Minor 2020-08-13 11:48:26 +02:00
Aleksey Kladov
80c241b39a Minor 2020-08-13 11:44:39 +02:00
Aleksey Kladov
f0a9128761 Minor 2020-08-13 11:41:39 +02:00
Aleksey Kladov
b0f03db51d Remove deprecated function 2020-08-13 11:37:54 +02:00
Aleksey Kladov
26b98b07aa Cleanup **Move Guard** assist 2020-08-13 10:57:17 +02:00
Aleksey Kladov
7d9480c6eb fmt 2020-08-13 10:36:04 +02:00
Aleksey Kladov
68c2238725 Rename ra_cfg -> cfg 2020-08-13 10:36:04 +02:00
Aleksey Kladov
5734cc8586 Simplify 2020-08-13 10:36:04 +02:00
Aleksey Kladov
3615758f8e Minimize deps 2020-08-13 10:36:04 +02:00
Aleksey Kladov
2f45cfc415 Rename ra_mbe -> mbe 2020-08-13 10:36:04 +02:00
Aleksey Kladov
0e6b94de78 Minor 2020-08-13 10:36:04 +02:00
Pavan Kumar Sunkara
349e6c62ad Rename ra_proc_macro_srv -> proc_macro_srv 2020-08-13 03:18:19 +02:00
Kirill Bulatov
0de795fc4c Consider only IdentPats for param name hints 2020-08-13 00:44:16 +03:00
Aleksey Kladov
0635458a6b **Merge Imports** assist handles self 2020-08-12 18:59:13 +02:00
Aleksey Kladov
a1c187eef3 Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
Aleksey Kladov
50a02eb359 Rename ra_parser -> parser 2020-08-12 17:14:23 +02:00
Aleksey Kladov
6dafc13f5f Rename ra_text_edit -> text_edit 2020-08-12 17:03:06 +02:00
Aleksey Kladov
7510048ec0 Cleanup TextEdit API 2020-08-12 16:58:56 +02:00
Aleksey Kladov
8d34262956 Rename ra_toolchain -> toolchain 2020-08-12 16:52:28 +02:00
Aleksey Kladov
550d7fbe3c Rename ra_tt -> tt 2020-08-12 16:46:54 +02:00
Aleksey Kladov
208b7bd7ba Rename ra_prof -> profile 2020-08-12 16:35:29 +02:00
Aleksey Kladov
98baa9b569 Rename ra_arena 2020-08-12 16:22:05 +02:00
bors[bot]
1e8b2c498a
Merge #5637
5637: SSR: Matching trait associated constants, types and functions r=matklad a=davidlattimore

This fixes matching of things like `HashMap::default()` by resolving `HashMap` instead of `default` (which resolves to `Default::default`).

Same for associated constants and types that are part of a trait implementation.

However, we still don't support matching calls to trait methods.

Co-authored-by: David Lattimore <dml@google.com>
2020-08-12 13:50:34 +00:00
bors[bot]
5b8fdfe231
Merge #5553
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 <mail4score@gmail.com>
2020-08-12 13:44:13 +00:00
bors[bot]
11de7ac2fb
Merge #4743
4743: Add tracking of packed repr, use it to highlight unsafe refs r=matklad a=Nashenas88

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.

Fixes #4600

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <paulf@pop-os.localdomain>
2020-08-12 13:20:18 +00:00
bors[bot]
2d41cc0ea3
Merge #5722
5722: Replace SepBy with Itertools

 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-12 13:06:38 +00:00