]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoUpdate outdated auto-import documentation
Lukas Tobias Wirth [Thu, 20 May 2021 13:29:21 +0000 (15:29 +0200)]
Update outdated auto-import documentation

3 years agoMerge #8873
bors[bot] [Thu, 20 May 2021 08:27:16 +0000 (08:27 +0000)]
Merge #8873

8873: Implement import-granularity guessing  r=matklad a=Veykril

This renames our `MergeBehavior` to `ImportGranularity` as rustfmt has it as the purpose of them are basically the same. `ImportGranularity::Preserve` currently has no specific purpose for us as we don't have an organize imports assist yet, so it currently acts the same as `ImportGranularity::Item`.

We now try to guess the import style on a per file basis and fall back to the user granularity setting if the file has no specific style yet or where it is ambiguous. This can be turned off by setting `import.enforceGranularity` to `true`.

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

Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
3 years agoCheck for differing attributes in granularity guessing
Lukas Tobias Wirth [Thu, 20 May 2021 08:25:04 +0000 (10:25 +0200)]
Check for differing attributes in granularity guessing

3 years agoMerge #8889
bors[bot] [Wed, 19 May 2021 21:35:50 +0000 (21:35 +0000)]
Merge #8889

8889: internal: Track in-scope derive helpers during nameres r=jonas-schievink a=jonas-schievink

...without using them yet

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoTrack in-scope derive helpers during nameres
Jonas Schievink [Wed, 19 May 2021 21:35:09 +0000 (23:35 +0200)]
Track in-scope derive helpers during nameres

3 years agoMerge #8888
bors[bot] [Wed, 19 May 2021 20:10:00 +0000 (20:10 +0000)]
Merge #8888

8888: fix: fix unresolved attribute fallback again r=jonas-schievink a=jonas-schievink

`ModItem`s are per-file, so we have to track the file if we store them in the crate-level `DefCollector`.

Fixes the remaining issue in https://github.com/rust-analyzer/rust-analyzer/pull/8882#issuecomment-844379170

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix unresolved attribute fallback again
Jonas Schievink [Wed, 19 May 2021 20:08:34 +0000 (22:08 +0200)]
Fix unresolved attribute fallback again

3 years agoMerge #8885 #8887
bors[bot] [Wed, 19 May 2021 19:07:05 +0000 (19:07 +0000)]
Merge #8885 #8887

8885: internal: greatly simplify eager macro representation r=jonas-schievink a=jonas-schievink

- Share structures with lazy macros, make both use `MacroCallLoc`.
- Remove `intern_eager_expansion`, `EagerCallLoc`, `EagerMacroId`, and *many* matches on `MacroCallId`.
- Make a lot of FIXMEs obsolete since the code no longer distinguishes between eager and lazy macros.
- Add `EagerCallInfo`, which is `Some` for calls to eager macros and holds the argument or expansion result and the included file.

8887: fix: fix derive collection after unresolved attribute fallback r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/pull/8882#issuecomment-844379170

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix derive collection after unresolved attribute fallback
Jonas Schievink [Wed, 19 May 2021 19:05:58 +0000 (21:05 +0200)]
Fix derive collection after unresolved attribute fallback

3 years agoMerge #8884
bors[bot] [Wed, 19 May 2021 18:30:36 +0000 (18:30 +0000)]
Merge #8884

8884: fix: add_explicit_type produces invalid code on `@` patterns r=Veykril a=iDawer

In
```rust
let name @ () = ();
```
 an explicit type should be inserted after the pattern, not just after the name.
`let` statement defined as `LetStmt = Attr* 'let' Pat (':' Type)? '=' initializer:Expr ';'`

Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
3 years agoadd_explicit_type respects `@` patterns
Dawer [Wed, 19 May 2021 18:12:09 +0000 (23:12 +0500)]
add_explicit_type respects `@` patterns

3 years agoClarify field name
Jonas Schievink [Wed, 19 May 2021 18:23:26 +0000 (20:23 +0200)]
Clarify field name

3 years agoSimplify eager macro representation
Jonas Schievink [Wed, 19 May 2021 18:19:08 +0000 (20:19 +0200)]
Simplify eager macro representation

3 years agoMerge #8875
bors[bot] [Wed, 19 May 2021 17:46:38 +0000 (17:46 +0000)]
Merge #8875

8875: fix: false positive "Missing match arm" when an or-pattern has mismatched types r=flodiebold a=iDawer

![Screenshot_20210519_114510](https://user-images.githubusercontent.com/7803845/118768935-19e12c00-b86f-11eb-90c4-1eed3f2bf57f.jpg)
`InferenceResult` now records pattern type mismatches.

Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
3 years agoMerge #8882
bors[bot] [Wed, 19 May 2021 17:06:49 +0000 (17:06 +0000)]
Merge #8882

8882: internal: resolve attributes in name resolution (minimal version) r=jonas-schievink a=jonas-schievink

Closes https://github.com/rust-analyzer/rust-analyzer/pull/7049

This should not have any observable effect, since we don't attempt to expand attribute macros yet, and I have implemented a fallback that treats items with unresolved attributes as if the attribute wasn't there.

Derive helpers are not yet resolved. `#![register_{attr,tool}]` are not yet supported.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRewrite `resolve_imports` to use an iterator
Jonas Schievink [Wed, 19 May 2021 17:05:03 +0000 (19:05 +0200)]
Rewrite `resolve_imports` to use an iterator

This allows reusing the original vector's allocation

3 years agoRestructure nameres loop to be a bit clearer
Jonas Schievink [Wed, 19 May 2021 16:56:00 +0000 (18:56 +0200)]
Restructure nameres loop to be a bit clearer

3 years agoReplace ImportGranularity::Guess with guessing boolean flag
Lukas Tobias Wirth [Tue, 18 May 2021 18:21:47 +0000 (20:21 +0200)]
Replace ImportGranularity::Guess with guessing boolean flag

3 years agointernal: resolve attributes in name resolution
Jonas Schievink [Wed, 19 May 2021 13:17:57 +0000 (15:17 +0200)]
internal: resolve attributes in name resolution

3 years agoMerge #8877
bors[bot] [Wed, 19 May 2021 12:31:44 +0000 (12:31 +0000)]
Merge #8877

8877: feat: allow clients to feature detect symbol filtering r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMerge #8880
bors[bot] [Wed, 19 May 2021 12:21:21 +0000 (12:21 +0000)]
Merge #8880

8880: fix: prepare_rename failing for modules r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
3 years agoFix prepare_rename failing for modules
Lukas Tobias Wirth [Wed, 19 May 2021 12:19:44 +0000 (14:19 +0200)]
Fix prepare_rename failing for modules

3 years agofeat: allow clients to feature detect symbol filtering
Aleksey Kladov [Wed, 19 May 2021 10:28:58 +0000 (13:28 +0300)]
feat: allow clients to feature detect symbol filtering

3 years agoCheck patterns for type match recursively.
Dawer [Wed, 19 May 2021 05:57:10 +0000 (10:57 +0500)]
Check patterns for type match recursively.

3 years agointernal: Record mismatches of pattern types.
Dawer [Wed, 19 May 2021 04:23:16 +0000 (09:23 +0500)]
internal: Record mismatches of pattern types.

3 years agoMerge #7698
bors[bot] [Tue, 18 May 2021 19:20:51 +0000 (19:20 +0000)]
Merge #7698

7698: Add new LSP extension for workspace symbol lookup r=matklad a=alcroito

As well as all symbol types (functions, modules).

Remove outdated documentation regarding symbol lookup filtering.

Closes #4881

Co-authored-by: alcroito <placinta@gmail.com>
3 years agoMerge #8871
bors[bot] [Tue, 18 May 2021 19:02:32 +0000 (19:02 +0000)]
Merge #8871

8871: internal: Simplify `DefCollector::resolve_macros` r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd ImportGranularity::Guess
Lukas Tobias Wirth [Tue, 18 May 2021 18:21:47 +0000 (20:21 +0200)]
Add ImportGranularity::Guess

3 years agoImplement import-granularity guessing
Lukas Tobias Wirth [Tue, 18 May 2021 18:10:39 +0000 (20:10 +0200)]
Implement import-granularity guessing

3 years agoMergeBehavior -> ImportGranularity
Lukas Tobias Wirth [Tue, 18 May 2021 17:49:15 +0000 (19:49 +0200)]
MergeBehavior -> ImportGranularity

3 years agoSimplify `DefCollector::resolve_macros`
Jonas Schievink [Tue, 18 May 2021 15:51:02 +0000 (17:51 +0200)]
Simplify `DefCollector::resolve_macros`

3 years agoMerge #8345
bors[bot] [Tue, 18 May 2021 02:02:34 +0000 (02:02 +0000)]
Merge #8345

8345: Add pub mod option for UnlinkedFile r=rainy-me a=rainy-me

close #8228

This is a draft that changes `Diagnostic` to contain multiple fixes. Pre analysis is in https://github.com/rust-analyzer/rust-analyzer/issues/8228#issuecomment-812887085 Because this solution is straightforward so I decided to type it out for discussion.

Currently the `check_fix` is not able to test the situation when multiple fixes available. <del>Also because `Insert 'mod x;'` and  `Insert 'pub mod x;'` are so similar, I don't know how to test them correctly and want some suggestions.</del>. I added
 `check_fixes` to allow checking mutiple possible fixes.

In additional, instead of append after possible existing `mod y`, I think it's possible to Insert `pub mod x;` after `pub mod y`. Should I implement this too?

Co-authored-by: rainy-me <github@rainy.me>
3 years agoAdd pub mod option for UnlinkedFile
rainy-me [Mon, 17 May 2021 23:11:07 +0000 (08:11 +0900)]
Add pub mod option for UnlinkedFile

3 years agoAdd new LSP extension for workspace symbol lookup
alcroito [Tue, 23 Feb 2021 12:03:31 +0000 (14:03 +0200)]
Add new LSP extension for workspace symbol lookup

The new extension allows filtering of workspace symbool lookup
results by search scope or search kind.

Filtering can be configured in 3 different ways:

 - The '#' or '*' markers can be added inline with the symbol lookup
   query.

   The '#' marker means symbols should be looked up in the current
   workspace and any dependencies. If not specified, only current
   workspace is considered.

   The '*' marker means all kinds of symbols should be looked up
   (types, functions, etc). If not specified, only type symbols are
   returned.

 - Each LSP request can take an optional search_scope or search_kind
   argument query parameter.

 - Finally there are 2 global config options that can be set for all
   requests served by the active RA instance.

Add support for setting the global config options to the VSCode
extension.
The extension does not use the per-request way, but it's useful for
other IDEs.

The latest version of VSCode filters out the inline markers, so
currently the only reasonable way to use the new functionality is
via the global config.

3 years agoMerge #8766
bors[bot] [Mon, 17 May 2021 18:45:29 +0000 (18:45 +0000)]
Merge #8766

8766: Extract function assist will add async if required r=Veykril a=JamieCunliffe

The extract function assist will check for an AWAIT_EXPR or AWAIT_KW in the body and if found, will add async to the generated function.

closes #8232

Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@outlook.com>
3 years agoExtract function assist will add async if required
Jamie Cunliffe [Sat, 24 Apr 2021 17:01:36 +0000 (18:01 +0100)]
Extract function assist will add async if required

The extract function assist will check for an AWAIT_EXPR in the body
and if found, will add async to the generated function.

3 years agointernal: use more evocative test folder name
Aleksey Kladov [Mon, 17 May 2021 15:43:20 +0000 (18:43 +0300)]
internal: use more evocative test folder name

3 years agominor: adjust config name
Aleksey Kladov [Mon, 17 May 2021 15:37:06 +0000 (18:37 +0300)]
minor: adjust config name

3 years agoMerge #8795
bors[bot] [Mon, 17 May 2021 14:41:56 +0000 (14:41 +0000)]
Merge #8795

8795: Allow semantic tokens for strings to be disabled r=matklad a=djrenren

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

Pretty straightforward change, but open to any suggestions if there's a more recommended testing strategy than what I went with.

Co-authored-by: John Renner <john@jrenner.net>
3 years agoMerge #8864
bors[bot] [Mon, 17 May 2021 11:50:09 +0000 (11:50 +0000)]
Merge #8864

8864: Update notify and fst r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoUpdate notify and fst
kjeremy [Mon, 17 May 2021 11:49:27 +0000 (07:49 -0400)]
Update notify and fst

3 years agoMerge #8858
bors[bot] [Mon, 17 May 2021 10:16:05 +0000 (10:16 +0000)]
Merge #8858

8858: Ignore macro import from `extern crate self` r=jonas-schievink a=ivan770

Closes #8834

Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
3 years agoMerge #8863
bors[bot] [Mon, 17 May 2021 09:45:23 +0000 (09:45 +0000)]
Merge #8863

8863: fix: don't add extra whitespace around fields r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofix: don't add extra whitespace around fields
Aleksey Kladov [Mon, 17 May 2021 09:41:48 +0000 (12:41 +0300)]
fix: don't add extra whitespace around fields

closes #8785

3 years agoAdded cov mark
ivan770 [Mon, 17 May 2021 09:37:24 +0000 (11:37 +0200)]
Added cov mark

3 years agominor: add missing tests
Aleksey Kladov [Mon, 17 May 2021 09:37:22 +0000 (12:37 +0300)]
minor: add missing tests

3 years agoMerge #8862
bors[bot] [Mon, 17 May 2021 09:04:57 +0000 (09:04 +0000)]
Merge #8862

8862: internal: scalable module structure for fixits r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: scalable module structure for fixits
Aleksey Kladov [Mon, 17 May 2021 09:04:17 +0000 (12:04 +0300)]
internal: scalable module structure for fixits

3 years agominor: extract fix to file
Aleksey Kladov [Mon, 17 May 2021 08:40:34 +0000 (11:40 +0300)]
minor: extract fix to file

3 years agoMerge #8861
bors[bot] [Mon, 17 May 2021 08:23:47 +0000 (08:23 +0000)]
Merge #8861

8861: minor: and one more recipe for ace r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: and one more recipe for ace
Aleksey Kladov [Mon, 17 May 2021 08:22:59 +0000 (11:22 +0300)]
minor: and one more recipe for ace

3 years agoMerge #8845
bors[bot] [Sun, 16 May 2021 19:32:40 +0000 (19:32 +0000)]
Merge #8845

8845: Generate the impl block via generate_trait_impl_text_from_impl r=Veykril a=hi-rustin

Try to close https://github.com/rust-analyzer/rust-analyzer/issues/8827

Co-authored-by: hi-rustin <rustin.liu@gmail.com>
3 years agoFix #8834
ivan770 [Sun, 16 May 2021 18:05:52 +0000 (20:05 +0200)]
Fix #8834

3 years agoMerge #8853
bors[bot] [Sun, 16 May 2021 17:35:40 +0000 (17:35 +0000)]
Merge #8853

8853: Tag Self in impls as a TypeAlias r=matklad a=Veykril

bors r+
Fixes #4398

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8854
bors[bot] [Sun, 16 May 2021 17:03:43 +0000 (17:03 +0000)]
Merge #8854

8854: internal: use mutable syntax trees when filling fields r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: use mutable syntax trees when filling fields
Aleksey Kladov [Sun, 16 May 2021 15:10:56 +0000 (18:10 +0300)]
internal: use mutable syntax trees when filling fields

3 years agoTag Self in impls as a TypeAlias
Lukas Wirth [Sun, 16 May 2021 13:11:48 +0000 (15:11 +0200)]
Tag Self in impls as a TypeAlias

3 years agointernal: use standard test style
Aleksey Kladov [Sun, 16 May 2021 12:14:57 +0000 (15:14 +0300)]
internal: use standard test style

3 years agointernal: use mutable trees when filling match arms
Aleksey Kladov [Sun, 16 May 2021 12:10:18 +0000 (15:10 +0300)]
internal: use mutable trees when filling match arms

3 years agominor: use uniform names
Aleksey Kladov [Sun, 16 May 2021 11:18:49 +0000 (14:18 +0300)]
minor: use uniform names

3 years agoMerge #8813
bors[bot] [Sun, 16 May 2021 01:53:12 +0000 (01:53 +0000)]
Merge #8813

8813: Get some more array lengths! r=lf- a=lf-

This is built on #8799 and thus contains its changes. I'll rebase it onto master when that one gets merged. It adds support for r-a understanding the length of:

* `let a: [u8; 2] = ...`
* `let a = b"aaa"`
* `let a = [0u8; 4]`

I have added support for getting the values of byte strings, which was not previously there. I am least confident in the correctness of this part and it probably needs some more tests, as we currently have only one test that exercised that part (!).

Fixes #2922.

Co-authored-by: Jade <software@lfcode.ca>
3 years agoAddress final feedback
Jade [Sun, 16 May 2021 01:51:18 +0000 (18:51 -0700)]
Address final feedback

* rename ConstExtension->ConstExt
* refactor a manual construction of a Const

3 years agoMerge #8848
bors[bot] [Sat, 15 May 2021 15:32:54 +0000 (15:32 +0000)]
Merge #8848

8848: Attach comments to ast::Impl r=Veykril a=Veykril

bors r+
Fixes #8847

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAttach comments to ast::Impl
Lukas Wirth [Sat, 15 May 2021 15:23:20 +0000 (17:23 +0200)]
Attach comments to ast::Impl

3 years agosimplify
Lukas Wirth [Sat, 15 May 2021 15:22:39 +0000 (17:22 +0200)]
simplify

3 years agoRemove attrs
hi-rustin [Sat, 15 May 2021 13:12:06 +0000 (21:12 +0800)]
Remove attrs

3 years agoAddress comments and add more tests
hi-rustin [Sat, 15 May 2021 12:07:32 +0000 (20:07 +0800)]
Address comments and add more tests

Fix tests

Fmt code

3 years agoGenerate the impl block via generate_trait_impl_text
hi-rustin [Sat, 15 May 2021 03:29:33 +0000 (11:29 +0800)]
Generate the impl block via generate_trait_impl_text

3 years agoMerge #8843
bors[bot] [Fri, 14 May 2021 23:10:39 +0000 (23:10 +0000)]
Merge #8843

8843: minor: simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agosimplify
Lukas Wirth [Fri, 14 May 2021 23:09:53 +0000 (01:09 +0200)]
simplify

3 years agoMerge #8840
bors[bot] [Fri, 14 May 2021 19:57:52 +0000 (19:57 +0000)]
Merge #8840

8840: fix: false positive "Missing match arm" when a tuple pattern is shorter than scrutinee type. r=Veykril a=iDawer

![Screenshot_20210515_003035](https://user-images.githubusercontent.com/7803845/118320023-2bcb7380-b4eb-11eb-9de6-d8762f981dc2.jpg)
Match checking diagnostic shouldn't fire when there is type mismatches.

rust-analyzer fd109fb58 2021-05-10 dev

(This is part of the preparation for https://github.com/rust-analyzer/rust-analyzer/pull/8717)

Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
3 years agoFix false positive "Missing match arm".
Dawer [Fri, 14 May 2021 19:09:17 +0000 (00:09 +0500)]
Fix false positive "Missing match arm".

3 years agoMerge #8839
bors[bot] [Fri, 14 May 2021 17:24:39 +0000 (17:24 +0000)]
Merge #8839

8839: minor: more useful bench r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: more useful bench
Aleksey Kladov [Fri, 14 May 2021 17:23:29 +0000 (20:23 +0300)]
minor: more useful bench

3 years agoMerge #8819
bors[bot] [Fri, 14 May 2021 17:15:21 +0000 (17:15 +0000)]
Merge #8819

8819: Use package root as `cargo check` working directory r=matklad a=bcully

Cargo commands are affected by the `.cargo/config` files above
their working directory. If cargo is invoked from above the directory
holding `Cargo.toml`, it may not pick up important settings like
registry replacements, causing it to behave differently or even fail.

Most cargo invocations are currently setting their working directories
to the directory containing `Cargo.toml`, but a couple of paths remain
in which cargo is invoked from the default workspace root instead.

This change fixes that, resolving some cargo check failures that I
experienced in a multi-root workspace in which packages used different
registries.

Co-authored-by: Brendan Cully <brendan@cully.org>
3 years agoMerge #8838
bors[bot] [Fri, 14 May 2021 17:01:05 +0000 (17:01 +0000)]
Merge #8838

8838: internal: use more mutable APIs r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: use more mutable APIs
Aleksey Kladov [Fri, 14 May 2021 17:00:35 +0000 (20:00 +0300)]
internal: use more mutable APIs

3 years agoMerge #8837
bors[bot] [Fri, 14 May 2021 15:54:38 +0000 (15:54 +0000)]
Merge #8837

8837: internal: rewrite assoc item manipulaion to use mutable trees r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: use standard style for tests
Aleksey Kladov [Fri, 14 May 2021 15:53:53 +0000 (18:53 +0300)]
internal: use standard style for tests

3 years agointernal: rewrite assoc item manipulaion to use mutable trees
Aleksey Kladov [Fri, 14 May 2021 15:47:08 +0000 (18:47 +0300)]
internal: rewrite assoc item manipulaion to use mutable trees

3 years agointernal: remove SyntaxRewriter
Aleksey Kladov [Fri, 14 May 2021 13:40:11 +0000 (16:40 +0300)]
internal: remove SyntaxRewriter

3 years agointernal: remove more of the SyntaxRewriter
Aleksey Kladov [Fri, 14 May 2021 13:28:59 +0000 (16:28 +0300)]
internal: remove more of the SyntaxRewriter

3 years agointernal: remove one more immutable tree
Aleksey Kladov [Mon, 10 May 2021 16:04:41 +0000 (19:04 +0300)]
internal: remove one more immutable tree

3 years agoMerge #8831
bors[bot] [Fri, 14 May 2021 09:50:36 +0000 (09:50 +0000)]
Merge #8831

8831: Apply async semantic token modifier to async/await keywords r=Veykril a=hi-rustin

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

Co-authored-by: hi-rustin <rustin.liu@gmail.com>
3 years agoAddress comments
hi-rustin [Fri, 14 May 2021 09:30:00 +0000 (17:30 +0800)]
Address comments

3 years agoAdd more tests, refactor array lengths/consteval work
Jade [Fri, 14 May 2021 07:59:30 +0000 (00:59 -0700)]
Add more tests, refactor array lengths/consteval work

Fix #2922: add unknown length as a condition for a type having unknown.

Incorporate reviews:

* Extract some of the const evaluation workings into functions
* Add fixmes on the hacks
* Add tests for impls on specific array lengths (these work!!! 😁)
* Add tests for const generics (indeed we don't support it yet)

3 years agoApply async semantic token modifier to async/await keywords
hi-rustin [Fri, 14 May 2021 02:36:12 +0000 (10:36 +0800)]
Apply async semantic token modifier to async/await keywords

Only async semantic token modifier

3 years agoMerge #8830
bors[bot] [Thu, 13 May 2021 22:44:34 +0000 (22:44 +0000)]
Merge #8830

8830: feat: Implement bulitin macro `concat_idents` r=edwin0cheng a=edwin0cheng

cc  #8828

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoImplement `concat_idents`
Edwin Cheng [Thu, 13 May 2021 22:42:10 +0000 (06:42 +0800)]
Implement `concat_idents`

3 years agoMerge #8822
bors[bot] [Thu, 13 May 2021 20:38:56 +0000 (20:38 +0000)]
Merge #8822

8822: minor: Cleanup imports r=Veykril a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMerge #8814
bors[bot] [Thu, 13 May 2021 17:37:52 +0000 (17:37 +0000)]
Merge #8814

8814: fix: Keep doc comments and outer attrs on "Move module to file" assist r=Veykril a=Jesse-Bakker

Fixes #8804

Co-authored-by: Jesse Bakker <github@jessebakker.com>
3 years agoMerge #8820
bors[bot] [Thu, 13 May 2021 16:48:11 +0000 (16:48 +0000)]
Merge #8820

8820: fix: Return absolute paths in find_path if crate start is ambiguous r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8823
bors[bot] [Thu, 13 May 2021 16:41:25 +0000 (16:41 +0000)]
Merge #8823

8823: Enable OPTION::ENABLE_TASKLISTS in pulldown_cmark r=Veykril a=Veykril

Closes #8821

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8825
bors[bot] [Thu, 13 May 2021 16:31:42 +0000 (16:31 +0000)]
Merge #8825

8825: Corrected minor typo on line 20 r=lnicola a=mixio

Co-authored-by: mixio <38652479+mixio@users.noreply.github.com>
3 years agoCorrected minor typo on line 20
mixio [Thu, 13 May 2021 16:29:48 +0000 (18:29 +0200)]
Corrected minor typo on line 20

3 years agoEnable OPTION::ENABLE_TASKLISTS in pulldown_cmark
Lukas Wirth [Thu, 13 May 2021 13:09:46 +0000 (15:09 +0200)]
Enable OPTION::ENABLE_TASKLISTS in pulldown_cmark

3 years agoCleanup imports
Aleksey Kladov [Thu, 13 May 2021 10:44:47 +0000 (13:44 +0300)]
Cleanup imports

3 years agofix: Keep doc comments and outer attrs on "Move module to file" assist
Jesse Bakker [Wed, 12 May 2021 13:06:54 +0000 (15:06 +0200)]
fix: Keep doc comments and outer attrs on "Move module to file" assist

3 years agoTest lowering byte strings some more
Jade [Thu, 13 May 2021 04:22:13 +0000 (21:22 -0700)]
Test lowering byte strings some more

3 years agoAdd support for lengths in array repeats, if they are literals
Jade [Wed, 12 May 2021 12:59:35 +0000 (05:59 -0700)]
Add support for lengths in array repeats, if they are literals

Now we will get the type of `[0u8; 4]`.