Commit graph

15267 commits

Author SHA1 Message Date
vlad20012 a157f19bf5
Fix proc macro TokenStream::from_str token ids 2021-03-01 19:55:30 +03:00
bors[bot] cda13d5461
Merge #7823
7823: Being Ty::InferenceVar closer to chalk equivalent r=flodiebold a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-01 12:57:26 +00:00
Lukas Wirth 4b7fc69315 Assert index relationship between type_variable_table and var_unification_table 2021-03-01 13:54:17 +01:00
Lukas Wirth 11a1f13cd1 Being Ty::InferenceVar closes to chalk equivalent 2021-03-01 12:41:29 +01:00
bors[bot] 1c7b2b8c07
Merge #7822
7822: Paperover a bug in cargo-workspace for publish RA r=lnicola a=edwin0cheng

r? @lnicola 

See also https://github.com/pksunkara/cargo-workspaces/issues/39

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-01 11:29:47 +00:00
Edwin Cheng 43f52a965c Paperover a bug in cargo-workspace for publish RA 2021-03-01 19:23:45 +08:00
bors[bot] 4e5c496199
Merge #7819 #7820
7819: Speedup heavy tests r=matklad a=matklad

bors r+
🤖

7820: Update vscode README with a small features list r=matklad a=Veykril

Nothing grande but I figured this is a bit better than showing almost nothing 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-01 11:15:19 +00:00
Lukas Wirth 91ff47ef6a Update vscode README with a small features list 2021-03-01 11:08:26 +01:00
Aleksey Kladov 4d14617636 Speedup heavy tests
We used to skip sysroot, but this logic got bitrotted, reinstalling.
2021-03-01 12:14:16 +03:00
bors[bot] 14cc626367
Merge #7818
7818: Clean up warnings r=matklad a=bugadani



Co-authored-by: Dániel Buga <bugadani@gmail.com>
2021-03-01 08:55:03 +00:00
Dániel Buga cb39f2df94 Clean up unused field warning 2021-03-01 09:12:42 +01:00
Dániel Buga 2f7b03b01c Remove redundant semicolon 2021-03-01 09:05:14 +01:00
bors[bot] 5df3ee8274
Merge #7816
7816: Lift Ty::Fn into a struct r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-28 22:54:07 +00:00
Lukas Wirth 407196b8c0 Lift FnPointer into a struct 2021-02-28 23:53:21 +01:00
bors[bot] 72457d022d
Merge #7815
7815: hir_ty: use default type generic for box expressions r=cynecx a=cynecx

r? @flodiebold

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6837 according to https://github.com/rust-analyzer/rust-analyzer/issues/6837#issuecomment-787456488.

Co-authored-by: cynecx <me@cynecx.net>
2021-02-28 22:24:21 +00:00
cynecx 2cdd1ff1b5 hir_ty: use default type generic for box expressions 2021-02-28 21:18:30 +01:00
bors[bot] 23d7dbfa5e
Merge #7814
7814: Turn Ty::Tuple variant into a tuple-variant r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-28 19:56:16 +00:00
Lukas Wirth a3fd2faba5 Remove Substs from Ty::ForeignType 2021-02-28 20:44:09 +01:00
Lukas Wirth 0e995adcf6 Turn Ty::Tuple variant into a tuple-variant 2021-02-28 20:39:43 +01:00
bors[bot] 2fc137b70f
Merge #7813
7813: Inline TypeCtor into Ty r=flodiebold a=Veykril

This removes the `ApplicationTy` variant from `Ty` bringing the representation a lot closer to chalk's `TyKind`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-28 19:16:51 +00:00
Lukas Wirth faf2dd49e4 Fix code_model::Type::walk not walking all types 2021-02-28 20:15:56 +01:00
bors[bot] 0a913fd111
Merge #7812
7812: Use consistent naming for assist r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-28 18:14:53 +00:00
Aleksey Kladov 406d96c7d4 Use consistent naming for assist 2021-02-28 21:14:34 +03:00
Lukas Wirth a3f5491a1a Inline TypeCtor into Ty 2021-02-28 19:13:37 +01:00
Aleksey Kladov aa04e3bbb2 Don't spam loop-rewriting assist
The more focused the assist, the better!
2021-02-28 21:08:51 +03:00
bors[bot] 358b9a50f7
Merge #7809
7809: Delete old issues from GitHub's bug report template r=lnicola a=saruman9



Co-authored-by: saruman9 <rum.274.4@gmail.com>
2021-02-28 15:15:58 +00:00
saruman9 f5c6c43bd1
Delete old issues from GitHub's bug report template 2021-02-28 18:12:43 +03:00
bors[bot] 803ff2e55e
Merge #7804
7804: Introduce TypeCtor::Scalar r=lnicola a=Veykril

`TypeCtor::Int(..) | TypeCtor::Float(..) | TypeCtor::Char | TypeCtor::Bool` => `TypeCtor::Scalar(..)`, in this case we can actually just straight up use `chalk_ir::Scalar` already since its just a POD without any IDs or anything.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-28 13:36:44 +00:00
bors[bot] 7f57a01b3d
Merge #7808
7808: Fix assert split exprs on comma r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-02-28 12:53:21 +00:00
Edwin Cheng 30402beeb2 Fix assert split exprs on comma 2021-02-28 20:46:24 +08:00
bors[bot] 76404c4ac8
Merge #7807
7807: Directly link changelog from quick-links section in 'README.md' file r=matklad a=regexident



Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-02-28 12:40:28 +00:00
Vincent Esche cbf784f85a Directly link changelog from quick-links section in 'README.md' file 2021-02-28 13:20:05 +01:00
bors[bot] 970ddf2b65
Merge #7806
7806: Fixed remaining references to `AnalysisChange` (now: `Change`) r=matklad a=regexident

(The type was renamed/moved in 8716c4cec3)

Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-02-28 12:00:14 +00:00
Vincent Esche c4e2f32d73 Fixed remaining references to AnalysisChange (now: Change)
(The type was renamed/moved in 8716c4cec3)
2021-02-28 12:57:41 +01:00
bors[bot] 7ed2da652d
Merge #7805
7805: For unresolved macros, hightlight only the last segment r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-28 11:29:44 +00:00
Aleksey Kladov 05729fd3c4 For unresolved macros, hightlight only the last segment 2021-02-28 14:29:10 +03:00
Lukas Wirth 7c2dd85a32 Use chalk_ir::Scalar directly 2021-02-28 11:06:37 +01:00
bors[bot] c412d5f8d1
Merge #7803
7803: Fix non-latin characters doc comment in mbe expansion r=edwin0cheng a=edwin0cheng

Fixes #7781

![Peek 2021-02-28 13-47](https://user-images.githubusercontent.com/11014119/109409237-f58e5580-79cb-11eb-92ed-a6700bbe39b5.gif)

Off-topic: This is a [beautiful poem](http://chinesepoetryinenglishverse.blogspot.com/2013/12/blog-post_4784.html) from by Li Shangyin.

bors r+


Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-02-28 05:55:06 +00:00
Edwin Cheng bf8bc5c882 Fix non-latin characters doc comment for mbe 2021-02-28 13:49:08 +08:00
bors[bot] e0437f899c
Merge #7802
7802: Fix builtin macros split exprs on comma r=edwin0cheng a=edwin0cheng

Fixes #7640

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-02-28 05:07:09 +00:00
Edwin Cheng f5bf1a9650 Fix builtin macros split exprs on comma 2021-02-28 13:06:17 +08:00
bors[bot] cbec995822
Merge #7801
7801: Restrict visibilities to the containing DefMap r=jonas-schievink a=jonas-schievink

Visibilities must always point into the DefMap where they are used, but in a block expression `self` resolves to the *containing* non-block module, which is in a different DefMap. Restrict visibilities accordingly, turning them into basically `pub(block)`, which Rust has no syntax for.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-02-28 03:49:40 +00:00
Jonas Schievink 6990b89b26 Restrict visibilities to the containing DefMap 2021-02-28 04:47:38 +01:00
Lukas Wirth 5183c9f083 Introduce TypeCtor::Scalar 2021-02-28 01:20:04 +01:00
bors[bot] f682627da4
Merge #7797
7797: Format generated lints and features manually r=matklad a=lnicola

As `quote` and `rustfmt` leave them on a single line, which makes running `grep` in the repository quite annoying.

Also removes a dead `gen_features.rs` file (`gen_lint_completions.rs` does the same thing).

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-02-27 14:56:24 +00:00
bors[bot] a8cf346b97
Merge #7566
7566: Add benchmark tests for mbe r=matklad a=edwin0cheng

This PR add more real world tests dumped from `rust-analyzer analysis-stats .` to benchmark its performance.

cc #7513

r? @matklad 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-02-27 14:39:22 +00:00
bors[bot] 4a24edd989
Merge #7677
7677: More enum matching r=yoshuawuyts a=jDomantas

* Renamed existing `generate_enum_match_method` to `generate_enum_is_variant`
* Added two similar assists to generate `into_` and `as_` methods.
* Made all of them general enough to work on record and tuple variants too.

For `as_` method generation there's room to improve:
* Right now it always returns `Option<&Field>`, even though `Option<Field>` would be nicer when `Field: Copy`. I don't know how to check if the field type implements `Copy`. If given suggestions I could try to fix this in a follow-up pr.
* `&String` could be replaced with `&str`, `&Box<_>` with `&_`, and probably some more. I don't know what would be a good way to do that.

Closes #7604

Co-authored-by: Domantas Jadenkus <djadenkus@gmail.com>
2021-02-27 14:29:10 +00:00
Laurențiu Nicola 351670f620 Remove dead gen_features code 2021-02-27 16:26:02 +02:00
Laurențiu Nicola 0fb01367f5 Format generated features manually instead of relying on rustfmt 2021-02-27 16:25:06 +02:00
Domantas Jadenkus 558bcf4e0b generate try_into instead of into 2021-02-27 12:21:57 +02:00