Commit graph

15994 commits

Author SHA1 Message Date
Jonas Schievink
40638b16c8 Use pub(crate) 2021-03-15 01:46:59 +01:00
Jonas Schievink
8b4cbbb87c Redo it properly and add a quickfix 2021-03-15 01:39:41 +01:00
bors[bot]
5ba7852cf1
Merge #8017
8017: Don't drop type params in doc-test paths r=Veykril a=Veykril

Closes #7995

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-14 19:46:49 +00:00
Lukas Wirth
f2610cbd7e Don't drop type params in doc-test paths 2021-03-14 20:38:26 +01:00
Florian Diebold
42217738e0 Don't use Substs for Ref/Raw/Array/Slice 2021-03-14 20:21:05 +01:00
ivan770
d6977550dd
Make CI happy 2021-03-14 19:05:09 +02:00
ivan770
7d48e04f31
Introduce StructureNodeKind 2021-03-14 19:00:41 +02:00
ivan770
8602f9573b
Added region intersection test 2021-03-14 18:53:40 +02:00
ivan770
56ca843695
Shorten trim call 2021-03-14 18:53:40 +02:00
ivan770
71a97a2d8c
Provide regions in file structure 2021-03-14 18:53:37 +02:00
Florian Diebold
af466f8542 Make Ty wrap TyKind in an Arc
... like it will be in Chalk. We still keep `interned_mut` and
`into_inner` methods that will probably not exist with Chalk.

This worsens performance slightly (5ginstr inference on RA), but doesn't
include other simplifications we can do yet.
2021-03-14 17:31:08 +01:00
bors[bot]
af8440b848
Merge #8014
8014: increase completion relevance for items in local scope r=matklad a=JoshMcguigan

This PR provides a small completion relevance score bonus for items in local scope. The changes here are relatively minimal, since `coc` by default pre-sorts by position in file. But as we move toward fully server side sorting #7935 I think we'll want some relevance score bump for items in local scope. 

### Before

Note `let~` and `syntax` are both ahead of locals. Ultimately we may decide that `let~` is a high relevance completion given my cursor position here, but that should be done with some explicit scoring on the server side, rather than being caused by (I think) `coc` preferring shorter completions. 

![pre-local-score](https://user-images.githubusercontent.com/22216761/111073414-c97ad600-849b-11eb-84e7-fcee130536f0.png)

### After

![post-local-score](https://user-images.githubusercontent.com/22216761/111073422-d0094d80-849b-11eb-92ec-7ae5ec3b190d.png)


Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
2021-03-14 15:56:29 +00:00
bors[bot]
406e4be04c
Merge #8016
8016: More Chalk adaptations r=flodiebold a=flodiebold

 - rename a bunch of fields
 - use `chalk_ir::FnSig`

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-14 15:34:37 +00:00
Florian Diebold
1954147834 More renaming 2021-03-14 16:33:27 +01:00
Florian Diebold
eea777c714 Use chalk_ir::FnSig 2021-03-14 16:30:43 +01:00
Florian Diebold
3411fe3e84 Rename some fields to their Chalk names 2021-03-14 16:30:43 +01:00
Josh Mcguigan
ba924d04b3 increase completion relevance for items in local scope 2021-03-14 08:00:47 -07:00
bors[bot]
f57e2f5598
Merge #7993
7993: Use auto-deref in completion scoring r=JoshMcguigan a=ivan770

Closes #7982 

Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
2021-03-14 14:27:53 +00:00
bors[bot]
a32ca8ef79
Merge #8013
8013: Fix `cargo xtask lint` references r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-03-14 14:19:31 +00:00
Laurențiu Nicola
dd9974c59d Fix cargo xtask lint references 2021-03-14 15:24:34 +02:00
bors[bot]
0c2f570151
Merge #8012
8012: xtask: replace "lint" command by a simply cargo alias r=matklad a=matthiaskrgr

This strips the run_clippy implementation out of xtask and replaces it by
a simple "cargo lint" alias which runs clippy with the corresponding flags.

Unfortunately  I could not name the alias "clippy" because that would lead to infinite recursion. 😅 

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2021-03-14 13:10:06 +00:00
Matthias Krüger
5008e56821 xtask: replace "lint" command by a simply cargo alias
This strips the run_clippy implementation out of xtask and replaces it by
a simple "cargo lint" alias which runs clippy with the corresponding flags.

Unfortunately  I could not name the alias "clippy" because that would lead to infinite recursion.
2021-03-14 13:36:45 +01:00
bors[bot]
a8a7fa8347
Merge #8011
8011: Add no-sysroot flag for analysis-stats r=edwin0cheng a=edwin0cheng

Add `no-sysroot` flag for `rust-analyzer analysis-stats`. It is very useful for debugging propose. 

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-14 10:50:59 +00:00
Edwin Cheng
8cc0c7f420 Add no-sysroot flag for analysis-stats 2021-03-14 18:31:14 +08:00
ivan770
8a9ebe62a1
Skip ref_match on same types, remove sorting in tests 2021-03-14 12:25:37 +02:00
bors[bot]
48adf6b697
Merge #8010
8010: Attach trivia to ast::Union nodes r=Veykril a=Veykril

Closes #8007
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-14 10:13:38 +00:00
Lukas Wirth
6e6d75bbdc Attach trivia to ast::Union nodes 2021-03-14 11:11:01 +01:00
Brandon
2df637f419 Fix incorrect diagnositics for failing built in eager macros 2021-03-13 21:28:10 -08:00
Brandon
4245973e24 Fix spelling error 2021-03-13 20:07:20 -08:00
bors[bot]
ab3f584299
Merge #8006
8006: Simpify mbe bindings builder r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-14 03:57:58 +00:00
Edwin Cheng
7279749bbb Simpify mbe bindings builder 2021-03-14 11:54:19 +08:00
bors[bot]
7808982952
Merge #8005
8005: Make sure ill-form macro handle propely r=edwin0cheng a=edwin0cheng

Fix #7987

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-14 03:26:32 +00:00
Edwin Cheng
b3b91046dd Make sure ill-form macro handle propely 2021-03-14 11:24:55 +08:00
bors[bot]
f80e1080d3
Merge #8003
8003: Move type lowering methods to TyLoweringContext r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-13 21:45:30 +00:00
Florian Diebold
3743ede404 Move type lowering methods to TyLoweringContext 2021-03-13 22:44:36 +01:00
bors[bot]
d3ca2ab959
Merge #8002
8002: Create TraitEnvironment through a query r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-13 19:39:54 +00:00
Florian Diebold
c82d1823a1 Create TraitEnvironment through a query 2021-03-13 20:38:45 +01:00
bors[bot]
17eeb2a6d2
Merge #8001
8001: More Chalk IDs r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-13 19:08:29 +00:00
Florian Diebold
b035c314b4 Use chalk_ir::OpaqueTyId 2021-03-13 20:05:47 +01:00
Florian Diebold
1bf6b7360c Use chalk_ir::PlaceholderIndex 2021-03-13 19:47:34 +01:00
Florian Diebold
2d69eb131f Use chalk_ir::ClosureId 2021-03-13 19:27:09 +01:00
bors[bot]
be7a31fbd6
Merge #7999
7999: Handle `cfg_attr` gating multiple attributes r=jonas-schievink a=jonas-schievink

Apparently `#[cfg_attr(cfg_expr, attr1, attr2)]` is valid, so let's add support for that.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-13 17:20:16 +00:00
Jonas Schievink
1848bd0fa0 Handle cfg_attr gating multiple attributes 2021-03-13 18:18:42 +01:00
Jonas Schievink
72785fb94d Extend cfg_attr test 2021-03-13 18:18:05 +01:00
bors[bot]
6ab405f2e9
Merge #7998
7998: Use more Chalk IDs r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-13 16:58:04 +00:00
Florian Diebold
9719ce9fc7 Use chalk_ir::FnDefId 2021-03-13 17:56:48 +01:00
Florian Diebold
19664e276a Use chalk_ir::AssocTypeId 2021-03-13 17:56:48 +01:00
Florian Diebold
dfafcd926a Use chalk_ir::ForeignDefId 2021-03-13 17:56:48 +01:00
ivan770
661cc7f0c8
Added both references and original matches to tests 2021-03-13 18:31:52 +02:00
bors[bot]
d453378569
Merge #7997
7997: fix folding range kind r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-13 16:25:02 +00:00