]>
git.lizzy.rs Git - rust.git/log
Laurențiu Nicola [Thu, 25 Mar 2021 10:17:48 +0000 (12:17 +0200)]
Make a full clone in release.yaml
bors[bot] [Wed, 24 Mar 2021 22:37:48 +0000 (22:37 +0000)]
Merge #7907
7907: Autoderef with visibility r=cynecx a=cynecx
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7841.
I am not sure about the general approach here. Right now this simply tries to check whether the autoderef candidate is reachable from the current module. ~~However this doesn't exactly work with traits (see the `tests::macros::infer_derive_clone_in_core` test, which fails right now).~~ see comment below
Refs:
- `rustc_typeck` checking fields: https://github.com/rust-lang/rust/blob/
66ec64ccf31883cd2c28d045912a76179c0c6ed2 /compiler/rustc_typeck/src/check/expr.rs#L1610
r? @flodiebold
Co-authored-by: cynecx <me@cynecx.net>
bors[bot] [Wed, 24 Mar 2021 22:13:56 +0000 (22:13 +0000)]
Merge #8190
8190: Fix chalk_ir assertion r=flodiebold a=flodiebold
Fixes #8150.
I implemented a validator that catches this in the tests, but it'd need to get merged in Chalk first.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Wed, 24 Mar 2021 22:07:54 +0000 (23:07 +0100)]
Fix chalk_ir assertion
Fixes #8150.
cynecx [Wed, 24 Mar 2021 22:09:22 +0000 (23:09 +0100)]
hir: don't use the self module as visible_from in iterate_method_candidates
cynecx [Wed, 24 Mar 2021 22:03:30 +0000 (23:03 +0100)]
hir_ty: don't call write_field_resolution when field candidate isn't visible
cynecx [Wed, 24 Mar 2021 21:59:59 +0000 (22:59 +0100)]
hir_def: move visibility queries from hir_ty to hir_def
bors[bot] [Wed, 24 Mar 2021 21:18:59 +0000 (21:18 +0000)]
Merge #8189
8189: Document unlinked-file diagnostic r=jonas-schievink a=jonas-schievink
fixes https://github.com/rust-analyzer/rust-analyzer/issues/8188
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Wed, 24 Mar 2021 21:18:17 +0000 (22:18 +0100)]
Document unlinked-file diagnostic
bors[bot] [Wed, 24 Mar 2021 18:00:18 +0000 (18:00 +0000)]
Merge #8187
8187: Sweep the new TraitEnvironmentQuery r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Wed, 24 Mar 2021 17:59:35 +0000 (18:59 +0100)]
Sweep the new TraitEnvironmentQuery
bors[bot] [Wed, 24 Mar 2021 11:31:51 +0000 (11:31 +0000)]
Merge #8184
8184: refine comment style of tests r=Veykril a=hi-rustin
Fix the comment style issues, it's in tests but maybe it's a little better to change it to this.
Co-authored-by: hi-rustin <rustin.liu@gmail.com>
hi-rustin [Wed, 24 Mar 2021 11:22:03 +0000 (19:22 +0800)]
refine comment style of tests
bors[bot] [Wed, 24 Mar 2021 10:55:25 +0000 (10:55 +0000)]
Merge #8168
8168: correct `convert to guard return` let_stmt r=Veykril a=hi-rustin
close https://github.com/rust-analyzer/rust-analyzer/issues/8074
Co-authored-by: hi-rustin <rustin.liu@gmail.com>
bors[bot] [Wed, 24 Mar 2021 10:17:12 +0000 (10:17 +0000)]
Merge #8183
8183: Fix missing command error with macros r=Veykril a=brandondong
**Reproduction:**
1. Define a struct through a macro (can be via `macro_rules`, proc macro, or `include!()`).
2. !!MISSING: command!! annotation appears. Clicking on it results in an error message. No matter where the macro is called/defined, the annotation is always at the start of the file.
![image](https://user-images.githubusercontent.com/
13722457 /
112268785 -
bce14500 -8c34-11eb-9a23-
bafd63ffd6ef .png)
**Cause:**
- For struct `A`, a `HasImpls` annotation is added just like for struct `B`. Unlike `B`, the file id for `A` is not the file we are adding annotations to but a macro file.
- The resolving step of the code lens does not succeed.
**Fix:**
- Check that the files match before computing offsets and adding `HasImpls`/`HasReferences` annotations.
Co-authored-by: Brandon <brandondong604@hotmail.com>
bors[bot] [Wed, 24 Mar 2021 08:53:48 +0000 (08:53 +0000)]
Merge #8177
8177: Limit the hints size by default r=Veykril a=SomeoneToIgnore
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8175
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/3138
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Brandon [Wed, 24 Mar 2021 07:47:55 +0000 (00:47 -0700)]
Clean up implementation
bors[bot] [Wed, 24 Mar 2021 07:11:28 +0000 (07:11 +0000)]
Merge #8182
8182: Trim down IPC json size r=edwin0cheng a=edwin0cheng
This PR try to trim down the json of proc macro IPC by ignore token id if it equals to `TokenId::unspecifed`.
Test by following commands:
```bash
$ git clone https://github.com/gluon-lang/lsp-types.git
$ export RA_LOG="proc_macro_api=debug"
$ rust-analyzer -q analysis-stats --load-output-dirs --with-proc-macro . 2> debug.log
$ cat debug.log | awk '/^\[DEBUG proc_macro_api::msg\] >/ {print substr($0,31)}' >expand.log
$ stat -c "%s" expand.log
```
Before:
37576726
After:
28551718
So it trimed down 75%.
bors r+
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Wed, 24 Mar 2021 07:01:37 +0000 (15:01 +0800)]
Trim down IPC json size
Brandon [Wed, 24 Mar 2021 07:00:38 +0000 (00:00 -0700)]
Fix MISSING: command error with macros
hi-rustin [Tue, 23 Mar 2021 15:23:01 +0000 (23:23 +0800)]
correct `convert to guard return` let_stmt
fix
fix
add check
bors[bot] [Tue, 23 Mar 2021 20:06:44 +0000 (20:06 +0000)]
Merge #8159
8159: Ignore proc-macro stdout to prevent IPC crash r=edwin0cheng a=edwin0cheng
fixes #7954
r? @flodiebold
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
bors[bot] [Tue, 23 Mar 2021 19:58:03 +0000 (19:58 +0000)]
Merge #8178
8178: Show item info when hovering intra doc links r=Veykril a=Veykril
![r4uIITP0IZ](https://user-images.githubusercontent.com/
3757771 /
112197618 -
91e2fb00 -8c0c-11eb-9edc-
a7923214d2b6 .gif)
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Tue, 23 Mar 2021 19:56:38 +0000 (20:56 +0100)]
Cleanup intra_doc_link parsing
Edwin Cheng [Tue, 23 Mar 2021 19:47:08 +0000 (03:47 +0800)]
Improve message usage in proc-macro
Reuse storage for the buffer send to child process of proc-macro.
Edwin Cheng [Tue, 23 Mar 2021 03:22:33 +0000 (11:22 +0800)]
Ignore proc-macro stdout to prevent IPC crash
Lukas Wirth [Tue, 23 Mar 2021 18:19:44 +0000 (19:19 +0100)]
Show item info when hovering intra doc links
bors[bot] [Tue, 23 Mar 2021 18:45:22 +0000 (18:45 +0000)]
Merge #8179
8179: cargo update r=kjeremy a=kjeremy
Removes dependency on socket2
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Tue, 23 Mar 2021 18:44:26 +0000 (14:44 -0400)]
cargo update
Removes dependency on socket2
Kirill Bulatov [Tue, 23 Mar 2021 17:43:55 +0000 (19:43 +0200)]
Bump the default hint length
bors[bot] [Tue, 23 Mar 2021 17:05:14 +0000 (17:05 +0000)]
Merge #8176
8176: Cleanup r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Kirill Bulatov [Tue, 23 Mar 2021 17:04:48 +0000 (19:04 +0200)]
Limit the hints size by default
Aleksey Kladov [Tue, 23 Mar 2021 16:59:33 +0000 (19:59 +0300)]
Cleanup
bors[bot] [Tue, 23 Mar 2021 16:54:35 +0000 (16:54 +0000)]
Merge #8173
8173: simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Tue, 23 Mar 2021 16:39:43 +0000 (17:39 +0100)]
simplify
bors[bot] [Tue, 23 Mar 2021 16:44:28 +0000 (16:44 +0000)]
Merge #8174
8174: Simplify code r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 23 Mar 2021 16:41:15 +0000 (19:41 +0300)]
Simplify code
changelog: skip
bors[bot] [Tue, 23 Mar 2021 16:24:18 +0000 (16:24 +0000)]
Merge #8170
8170: Merge bang-macros and derives in name resolution r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Tue, 23 Mar 2021 16:23:10 +0000 (17:23 +0100)]
Merge bang-macros and derives in name resolution
bors[bot] [Tue, 23 Mar 2021 15:55:04 +0000 (15:55 +0000)]
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>
Lukas Wirth [Tue, 23 Mar 2021 15:50:36 +0000 (16:50 +0100)]
Make more use of the HIR in rename::rename_to_self
bors[bot] [Tue, 23 Mar 2021 14:50:29 +0000 (14:50 +0000)]
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>
Aleksey Kladov [Tue, 23 Mar 2021 14:44:17 +0000 (17:44 +0300)]
Use styleguide conforming import for ast nodes
bors[bot] [Tue, 23 Mar 2021 14:40:34 +0000 (14:40 +0000)]
Merge #8166
8166: Unify test style r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 23 Mar 2021 14:38:51 +0000 (17:38 +0300)]
Unify test style
changelog skip
bors[bot] [Tue, 23 Mar 2021 14:32:25 +0000 (14:32 +0000)]
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>
Aleksey Kladov [Tue, 23 Mar 2021 14:31:19 +0000 (17:31 +0300)]
Tweak assits API to fit mutable syntax trees
changelog: skip
bors[bot] [Tue, 23 Mar 2021 12:05:45 +0000 (12:05 +0000)]
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>
Lukas Wirth [Mon, 22 Mar 2021 16:11:33 +0000 (17:11 +0100)]
Cleanup Definition::search_scope
Lukas Wirth [Mon, 22 Mar 2021 14:56:59 +0000 (15:56 +0100)]
Merge hir::MacroDef::is_* into hir::MacroDef::kind
Lukas Wirth [Sun, 21 Mar 2021 19:08:08 +0000 (20:08 +0100)]
Set up a search scope when searching for mbe macro references
bors[bot] [Tue, 23 Mar 2021 10:20:47 +0000 (10:20 +0000)]
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>
Aleksey Kladov [Tue, 23 Mar 2021 10:01:45 +0000 (13:01 +0300)]
Improve readability
Aleksey Kladov [Tue, 23 Mar 2021 09:59:51 +0000 (12:59 +0300)]
Align naming of deps and revdeps
Aleksey Kladov [Tue, 23 Mar 2021 09:58:48 +0000 (12:58 +0300)]
Align semantics of deps and rev deps
Aleksey Kladov [Tue, 23 Mar 2021 09:49:55 +0000 (12:49 +0300)]
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.
bors[bot] [Tue, 23 Mar 2021 09:24:26 +0000 (09:24 +0000)]
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>
Josh Mcguigan [Tue, 23 Mar 2021 03:34:02 +0000 (20:34 -0700)]
add unit test to demonstrate struct fields/methods do not get ref match completions
bors[bot] [Mon, 22 Mar 2021 20:39:58 +0000 (20:39 +0000)]
Merge #8156
8156: Correctly lower TraitRefs with default params r=flodiebold a=Veykril
Fixes #5685
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Mon, 22 Mar 2021 18:13:43 +0000 (19:13 +0100)]
Correctly lower TraitRefs with default params
bors[bot] [Mon, 22 Mar 2021 17:56:18 +0000 (17:56 +0000)]
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>
Jonas Schievink [Mon, 22 Mar 2021 17:47:19 +0000 (18:47 +0100)]
resolver: manually traverse nested block scopes
Aleksey Kladov [Thu, 18 Mar 2021 09:57:55 +0000 (12:57 +0300)]
rewrite merge use trees assist to use muatable syntax trees
changelog internal
bors[bot] [Mon, 22 Mar 2021 17:27:32 +0000 (17:27 +0000)]
Merge #8153
8153: :arrow_up: rowan r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 22 Mar 2021 17:26:59 +0000 (20:26 +0300)]
:arrow_up: rowan
bors[bot] [Mon, 22 Mar 2021 13:20:07 +0000 (13:20 +0000)]
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>
Kirill Bulatov [Mon, 22 Mar 2021 13:15:53 +0000 (15:15 +0200)]
Code review fixes
bors[bot] [Mon, 22 Mar 2021 13:08:45 +0000 (13:08 +0000)]
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>
bors[bot] [Mon, 22 Mar 2021 12:35:44 +0000 (12:35 +0000)]
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>
bors[bot] [Mon, 22 Mar 2021 12:25:53 +0000 (12:25 +0000)]
Merge #8139
8139: Align `Canonical` and `InEnvironment` with the Chalk versions r=flodiebold a=flodiebold
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
bors[bot] [Mon, 22 Mar 2021 12:08:25 +0000 (12:08 +0000)]
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>
Aleksey Kladov [Mon, 22 Mar 2021 12:08:04 +0000 (15:08 +0300)]
Update docs/dev/README.md
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
Aleksey Kladov [Mon, 22 Mar 2021 11:59:56 +0000 (14:59 +0300)]
Document patch policy
hi-rustin [Mon, 22 Mar 2021 07:17:01 +0000 (15:17 +0800)]
bail out early for source code closures
add closure error
bors[bot] [Mon, 22 Mar 2021 10:56:37 +0000 (10:56 +0000)]
Merge #8145
8145: Document our security stance r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 22 Mar 2021 10:56:13 +0000 (13:56 +0300)]
Apply suggestions from code review
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
Aleksey Kladov [Mon, 22 Mar 2021 10:55:16 +0000 (13:55 +0300)]
Update docs/user/manual.adoc
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Aleksey Kladov [Mon, 22 Mar 2021 10:53:00 +0000 (13:53 +0300)]
Document our security stance
changelog: feature
bors[bot] [Mon, 22 Mar 2021 05:41:04 +0000 (05:41 +0000)]
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>
Edwin Cheng [Mon, 22 Mar 2021 05:39:13 +0000 (13:39 +0800)]
Reexport PrefixKind to remove deps to hir
Josh Mcguigan [Mon, 22 Mar 2021 00:30:56 +0000 (17:30 -0700)]
implement a temporary workaround for #8058
Kirill Bulatov [Sun, 21 Mar 2021 21:45:00 +0000 (23:45 +0200)]
Do not revisit recursively imported modules
bors[bot] [Sun, 21 Mar 2021 19:25:14 +0000 (19:25 +0000)]
Merge #8137
8137: Fix box pattern inference panic r=flodiebold a=Veykril
Fixes #6560
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Florian Diebold [Sun, 21 Mar 2021 19:19:07 +0000 (20:19 +0100)]
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.
Florian Diebold [Sun, 21 Mar 2021 19:05:38 +0000 (20:05 +0100)]
Align Canonical more with Chalk's version
In particular, use chalk_ir::CanonicalVarKinds.
bors[bot] [Sun, 21 Mar 2021 17:57:45 +0000 (17:57 +0000)]
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>
Yilin Chen [Sun, 21 Mar 2021 17:54:05 +0000 (01:54 +0800)]
check is_include_macro only when attr_path is not specified
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Lukas Wirth [Sun, 21 Mar 2021 17:18:25 +0000 (18:18 +0100)]
Fix box pattern inference panic
Florian Diebold [Sun, 21 Mar 2021 16:40:14 +0000 (17:40 +0100)]
Use QuantifiedWhereClause in generic_predicates as well
Still far too much binder skipping going on; I find it hard to imagine
this is all correct, but the tests pass.
Florian Diebold [Sun, 21 Mar 2021 12:22:22 +0000 (13:22 +0100)]
Introduce QuantifiedWhereClause and DynTy analogous to Chalk
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.
bors[bot] [Sun, 21 Mar 2021 16:42:08 +0000 (16:42 +0000)]
Merge #8133
8133: Ignore type bindings in generic_predicates_for_param (fix panic on ena and crates depending on it) r=flodiebold a=flodiebold
This allows us to handle more cases without a query cycle, which includes certain cases that rustc accepted. That in turn means we avoid triggering salsa-rs/salsa#257 on valid code (it will still happen if the user writes an actual cycle).
We actually accept more definitions than rustc now; that's because rustc only ignores bindings when looking up super traits, whereas we now also ignore them when looking for predicates to disambiguate associated type shorthand. We could introduce a separate query for super traits if necessary, but for now I think this should be fine.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
bors[bot] [Sun, 21 Mar 2021 15:57:14 +0000 (15:57 +0000)]
Merge #8132
8132: Add `'` to trigger_characters, allowing more direct lifetime completions r=Veykril a=Veykril
Fixes having to type a character after `'` to complete lifetimes and labels
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Sun, 21 Mar 2021 15:49:31 +0000 (15:49 +0000)]
Merge #8135
8135: more clippy::{perf, complexity, style} fixes r=Veykril a=matthiaskrgr
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
bors[bot] [Sun, 21 Mar 2021 15:21:11 +0000 (15:21 +0000)]
Merge #8128
8128: Expand legacy-scoped macro during collection r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8120
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Matthias Krüger [Sun, 21 Mar 2021 14:33:18 +0000 (15:33 +0100)]
a lot of clippy::style fixes
Yilin Chen [Sun, 21 Mar 2021 15:02:01 +0000 (23:02 +0800)]
use the included file as the source of expanded include macro
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Florian Diebold [Sat, 20 Mar 2021 19:07:36 +0000 (20:07 +0100)]
Ignore type bindings in generic_predicates_for_param
This allows us to handle more cases without a query cycle, which
includes certain cases that rustc accepted. That in turn means we avoid
triggering salsa-rs/salsa#257 on valid code (it will still happen if the
user writes an actual cycle).
We actually accept more definitions than rustc now; that's because rustc
only ignores bindings when looking up super traits, whereas we now also
ignore them when looking for predicates to disambiguate associated type
shorthand. We could introduce a separate query for super traits if
necessary, but for now I think this should be fine.
Florian Diebold [Sat, 20 Mar 2021 14:26:42 +0000 (15:26 +0100)]
Test for a Salsa bug
Matthias Krüger [Sun, 21 Mar 2021 12:13:34 +0000 (13:13 +0100)]
clippy::complexity simplifications related to Iterators
Matthias Krüger [Sun, 21 Mar 2021 11:49:40 +0000 (12:49 +0100)]
xtask: remove redundant lifetime (clippy::extra_unused_lifetimes)