Commit graph

15944 commits

Author SHA1 Message Date
Lukas Wirth
caaeb92882 Cleanup intra_doc_link parsing 2021-03-23 20:56:38 +01:00
Lukas Wirth
8b0d0bd9c7 Show item info when hovering intra doc links 2021-03-23 19:57:04 +01:00
bors[bot]
065a8e87cd
Merge #8169
8169: Make more use of the HIR in rename::rename_to_self r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-23 15:55:04 +00:00
Lukas Wirth
638dcac092 Make more use of the HIR in rename::rename_to_self 2021-03-23 16:54:21 +01:00
bors[bot]
1dbc5b7cc7
Merge #8167
8167: Use styleguide conforming import for ast nodes r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-23 14:50:29 +00:00
Aleksey Kladov
860e069d4d Use styleguide conforming import for ast nodes 2021-03-23 17:44:17 +03:00
bors[bot]
0469280c8a
Merge #8166
8166: Unify test style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-23 14:40:34 +00:00
Aleksey Kladov
7352f50ec2 Unify test style
changelog skip
2021-03-23 17:38:51 +03:00
bors[bot]
d15edf779b
Merge #8165
8165: Tweak assits API to fit mutable syntax trees r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-23 14:32:25 +00:00
Aleksey Kladov
b83c7eedcc Tweak assits API to fit mutable syntax trees
changelog: skip
2021-03-23 17:31:19 +03:00
bors[bot]
258afb8fb8
Merge #8138
8138: Set up a search scope when searching for mbe macro references r=Veykril a=Veykril

Closes #6184

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-23 12:05:45 +00:00
Lukas Wirth
395183e0b7 Cleanup Definition::search_scope 2021-03-23 13:03:55 +01:00
Lukas Wirth
7c4eb66c1a Merge hir::MacroDef::is_* into hir::MacroDef::kind 2021-03-23 11:32:14 +01:00
Lukas Wirth
bad4e48672 Set up a search scope when searching for mbe macro references 2021-03-23 11:32:10 +01:00
bors[bot]
1efd220f2f
Merge #8162
8162: Compute more mathematically well-rounded notion of transitive deps r=Veykril a=matklad

By including the crate itself, we make the resulting set closed with
respect to `transitve_reveres_dependencies` operation, as it becomes a
proper transitive closure. This just feels more proper and mathy.

And, indeed, this actually allows us to simplify call sites somewhat.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-23 10:20:47 +00:00
Aleksey Kladov
fa9c6eb456 Improve readability 2021-03-23 13:04:43 +03:00
Aleksey Kladov
ba48c0d8bd Align naming of deps and revdeps 2021-03-23 13:04:43 +03:00
Aleksey Kladov
521a26b0d2 Align semantics of deps and rev deps 2021-03-23 12:58:48 +03:00
Aleksey Kladov
45a8f37b6a Compute more mathematically well-rounded notion of transitive deps
By including the crate itself, we make the resulting set closed with
respect to `transitve_reveres_dependencies` operation, as it becomes a
proper transitive closure. This just feels more proper and mathy.

And, indeed, this actually allows us to simplify call sites somewhat.
2021-03-23 12:49:55 +03:00
bors[bot]
bf3a8eb40a
Merge #8142
8142: temp disable broken ref match completions for struct fields/methods r=matklad a=JoshMcguigan

This PR implements a temporary workaround for #8058 by disabling ref match completions for struct fields and methods. Disabling this doesn't break any existing functionality (that I am aware of) since these completions were broken.

I plan to keep working on a real fix for the underlying issue here, but I think a proper fix could take some time, so I'd prefer to quickly fix the bug to buy some more time to implement a better solution (which would ultimately allow re-enabling ref matches for struct fields and methods). 

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
2021-03-23 09:24:26 +00:00
Josh Mcguigan
18c3fb2df5 add unit test to demonstrate struct fields/methods do not get ref match completions 2021-03-22 20:34:02 -07:00
bors[bot]
4b997b8663
Merge #8156
8156: Correctly lower TraitRefs with default params r=flodiebold a=Veykril

Fixes #5685

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-22 20:39:58 +00:00
Lukas Wirth
0aa4ac362d Correctly lower TraitRefs with default params 2021-03-22 19:13:43 +01:00
bors[bot]
97fe64a5c7
Merge #8154 #8155
8154: rewrite merge use trees assist to use muatable syntax trees r=matklad a=matklad

bors r+
🤖

8155: Fix confusion between parameters and the function r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8152

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-03-22 17:56:18 +00:00
Jonas Schievink
2633e23f2b resolver: manually traverse nested block scopes 2021-03-22 18:55:51 +01:00
Aleksey Kladov
9cbf09ec4f rewrite merge use trees assist to use muatable syntax trees
changelog internal
2021-03-22 20:47:46 +03:00
bors[bot]
d834306e7c
Merge #8153
8153: ⬆️ rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-22 17:27:32 +00:00
Aleksey Kladov
48b534ceb8 ⬆️ rowan 2021-03-22 20:26:59 +03:00
bors[bot]
94aa3a7b1a
Merge #8141
8141: Don't suggest long looping paths for imports r=matklad a=SomeoneToIgnore

Fixes https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/name.3A.3Aname.3A.3Aname.3A.3Aname.3A.3Aname


Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2021-03-22 13:20:07 +00:00
Kirill Bulatov
129353255c Code review fixes 2021-03-22 15:15:53 +02:00
bors[bot]
d4fa6721af
Merge #8054
8054: Item movers r=matklad a=ivan770

Closes #6823

https://user-images.githubusercontent.com/14003886/111331579-b4f43480-8679-11eb-9af0-e4dabacc4923.mp4

Implementation issues:
- [ ] Most of items are non-movable, since _movability_ of any item has to be determined manually. Common ones are movable though
- [x] Cursor should move with the item

Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
2021-03-22 13:08:45 +00:00
bors[bot]
3af1885bd2
Merge #8144
8144: bail out early for source code closures r=Veykril a=hi-rustin

close https://github.com/rust-analyzer/rust-analyzer/issues/8084

Co-authored-by: hi-rustin <rustin.liu@gmail.com>
2021-03-22 12:35:44 +00:00
bors[bot]
e220d3d507
Merge #8139
8139: Align `Canonical` and `InEnvironment` with the Chalk versions r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-22 12:25:53 +00:00
bors[bot]
6f1f91cdcf
Merge #8136 #8146
8136: Introduce QuantifiedWhereClause and DynTy analogous to Chalk r=flodiebold a=flodiebold

This introduces a bunch of new binders in lots of places, which we have to be careful about, but we had to add them at some point. There's a lot of skipping of the binders; once we're done with the Chalk move, we should review the remaining ones.

8146: Document patch policy r=matklad a=matklad

bors r+
🤖

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-22 12:08:25 +00:00
Aleksey Kladov
79b4c89b89
Update docs/dev/README.md
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-03-22 15:08:04 +03:00
Aleksey Kladov
aab148f943 Document patch policy 2021-03-22 14:59:56 +03:00
hi-rustin
2e09714dfe bail out early for source code closures
add closure error
2021-03-22 19:40:07 +08:00
bors[bot]
ad39959361
Merge #8145
8145: Document our security stance r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-22 10:56:37 +00:00
Aleksey Kladov
2469af3017
Apply suggestions from code review
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-03-22 13:56:13 +03:00
Aleksey Kladov
2b427fa3dd
Update docs/user/manual.adoc
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2021-03-22 13:55:16 +03:00
Aleksey Kladov
63e083122c Document our security stance
changelog: feature
2021-03-22 13:53:00 +03:00
bors[bot]
27befe6c7f
Merge #8143
8143: Reexport PrefixKind to remove deps of hir in rust-analyzer crate r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-22 05:41:04 +00:00
Edwin Cheng
7784cadc3d Reexport PrefixKind to remove deps to hir 2021-03-22 13:39:13 +08:00
Josh Mcguigan
8cd94900f7 implement a temporary workaround for #8058 2021-03-21 17:30:56 -07:00
Kirill Bulatov
3a4e99115d Do not revisit recursively imported modules 2021-03-22 00:46:52 +02:00
bors[bot]
858ad55437
Merge #8137
8137: Fix box pattern inference panic r=flodiebold a=Veykril

Fixes #6560

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-21 19:25:14 +00:00
Florian Diebold
c4fd3f47f5 Align InEnvironment with Chalk
This in particular means storing a chalk_ir::Environment, not our
TraitEnvironment. This makes InEnvironment not usable for Type, where we
need to keep the full TraitEnvironment.
2021-03-21 20:19:07 +01:00
Florian Diebold
f7be314579 Align Canonical more with Chalk's version
In particular, use chalk_ir::CanonicalVarKinds.
2021-03-21 20:05:38 +01:00
bors[bot]
31ed164161
Merge #8134
8134: Correct the paths of submodules from the include! macro r=edwin0cheng a=sticnarf

This PR should fix #7846. It mostly follows the instructions from @edwin0cheng in that issue.

Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2021-03-21 17:57:45 +00:00
Yilin Chen
7b693470c4
check is_include_macro only when attr_path is not specified
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2021-03-22 01:54:05 +08:00