]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #6888
bors[bot] [Tue, 15 Dec 2020 12:34:37 +0000 (12:34 +0000)]
Merge #6888

6888: Use standard test style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMerge #6889
bors[bot] [Tue, 15 Dec 2020 09:15:41 +0000 (09:15 +0000)]
Merge #6889

6889: Resolve `macro-error` diagnostics on asm & llvm_asm r=matklad a=lf-

We currently stub these out as returning unit.

This fixes spurious RA `macro-error` diagnostics introduced somewhere around 0.2.400 in the following:
```rust
unsafe { asm!(""); llvm_asm!(""); }
```

I'd ideally like to write a unit test for this, but I'm not familiar with where the tests for `hir_expand` are.

Thanks to @edwin0cheng for help on resolving this issue.

Co-authored-by: lf- <lf-@users.noreply.github.com>
3 years agoResolve `macro-error` diagnostics on asm & llvm_asm
lf- [Tue, 15 Dec 2020 09:05:20 +0000 (01:05 -0800)]
Resolve `macro-error` diagnostics on asm & llvm_asm

We currently stub these out as returning unit.

This fixes spurious RA diagnostics in the following:
```rust
unsafe { asm!(""); llvm_asm!(""); }
```

3 years agoUse standard test style
Aleksey Kladov [Tue, 15 Dec 2020 08:51:40 +0000 (11:51 +0300)]
Use standard test style

3 years agoMerge #6887
bors[bot] [Tue, 15 Dec 2020 08:49:54 +0000 (08:49 +0000)]
Merge #6887

6887: Add `#` to canonical test example r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd `#` to canonical test example
Aleksey Kladov [Tue, 15 Dec 2020 08:49:22 +0000 (11:49 +0300)]
Add `#` to canonical test example

3 years agoMerge #6875
bors[bot] [Tue, 15 Dec 2020 08:38:08 +0000 (08:38 +0000)]
Merge #6875

6875: Add find usages for enum constructors r=matklad a=sasurau4

Fix #2549 for enum

Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
3 years agoMerge #6885
bors[bot] [Tue, 15 Dec 2020 07:42:27 +0000 (07:42 +0000)]
Merge #6885

6885: Add !language-configuration.json to .vscodeignore r=matklad a=bryangingechen

#6840 added a `language-configuration.json` file to `package.json`, but because `.vscodeignore` was not updated, this file was not uploaded when the extension was published, leading to constant errors in the VS Code dev tools console:
```
[Extension Host] stack trace: Error: ENOENT: no such file or directory, open '/Users/-/.vscode/extensions/matklad.rust-analyzer-0.2.416/language-configuration.json'
```

Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
3 years agoadd language-configuration.json to .vscodeignore
Bryan Gin-ge Chen [Tue, 15 Dec 2020 03:05:22 +0000 (22:05 -0500)]
add language-configuration.json to .vscodeignore

3 years agoAdd find usages for enum constructors
Daiki Ihara [Mon, 14 Dec 2020 15:39:42 +0000 (00:39 +0900)]
Add find usages for enum constructors

3 years agoMerge #6874
bors[bot] [Mon, 14 Dec 2020 15:39:31 +0000 (15:39 +0000)]
Merge #6874

6874: Implement `module_path!()` r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoImplement `module_path!()`
Jonas Schievink [Mon, 14 Dec 2020 15:38:53 +0000 (16:38 +0100)]
Implement `module_path!()`

3 years agoMerge #6862
bors[bot] [Mon, 14 Dec 2020 15:15:52 +0000 (15:15 +0000)]
Merge #6862

6862: Add LifetimeParam resolving to Semantics r=matklad a=Veykril

This is stuff required for the lifetime references/definitions PR. I pulled this out to make it easier to review as well as because there is one thing that still has to be addressed which can be found in the review comments.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6817
bors[bot] [Mon, 14 Dec 2020 15:04:47 +0000 (15:04 +0000)]
Merge #6817

6817: Replace goblin crate with object r=matklad a=lnicola

Continuation of #4385.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoAdd LifetimeParam resolving to Semantics
Lukas Wirth [Sun, 13 Dec 2020 21:13:16 +0000 (22:13 +0100)]
Add LifetimeParam resolving to Semantics

3 years agoMerge #6871
bors[bot] [Mon, 14 Dec 2020 12:06:56 +0000 (12:06 +0000)]
Merge #6871

6871: Link config source r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoLink config source
Aleksey Kladov [Mon, 14 Dec 2020 12:06:24 +0000 (15:06 +0300)]
Link config source

3 years agoMerge #6858
bors[bot] [Sun, 13 Dec 2020 14:41:10 +0000 (14:41 +0000)]
Merge #6858

6858: Docs: Explain manual installation in VS Code r=lnicola a=cauthmann

same as https://github.com/rust-analyzer/rust-analyzer.github.io/pull/81 , just against the correct repository this time

Co-authored-by: Christian Authmann <8371862+cauthmann@users.noreply.github.com>
3 years agoDocs: Explain manual installation in VS Code
Christian Authmann [Sun, 13 Dec 2020 14:21:11 +0000 (15:21 +0100)]
Docs: Explain manual installation in VS Code

3 years agoMerge #6840
bors[bot] [Sun, 13 Dec 2020 14:20:11 +0000 (14:20 +0000)]
Merge #6840

6840: Add a language configuration file for VS Code r=matklad a=dustypomerleau

There has been recent discussion in #6451 and #6682 about the need to include angle brackets in auto-close and auto-surround functionality. This PR will accomplish that, but only for users of VS Code, as it uses the VS Code-specific `language-configuration.json` to get the job done. Since there are a large number of VS Code users in the Rust Analyzer cohort, it may be reasonable to fix the issue for them, while waiting on a more comprehensive solution in the language server. In addition to the usual brackets, I've added auto-closing of block comments. I avoided autoclosing single quotes, given that lifetimes are more common than chars.

Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
3 years agoMerge #6856
bors[bot] [Sun, 13 Dec 2020 13:54:39 +0000 (13:54 +0000)]
Merge #6856

6856: Add test for #6852 r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoAdd test for #6852
Florian Diebold [Sun, 13 Dec 2020 13:52:45 +0000 (14:52 +0100)]
Add test for #6852

3 years agoMerge #6855
bors[bot] [Sun, 13 Dec 2020 13:18:41 +0000 (13:18 +0000)]
Merge #6855

6855: Change recommendation when source can't be loaded from sysroot r=matklad a=flodiebold

Since we just tried running `rustup component add`, it doesn't make sense to me to recommend trying that again. If we're reaching this case, it's probably more likely that rustc was installed via package manager, in which case the source should be installed the same way (e.g. if you install the rust-src package on Ubuntu it will install a symlink in the right place to make our sysroot
detection work, and IMO we should get other distributors to do the same if they aren't already).

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoReplace goblin crate with object
Laurențiu Nicola [Fri, 11 Dec 2020 12:53:22 +0000 (14:53 +0200)]
Replace goblin crate with object

3 years agoChange recommendation when source can't be loaded from sysroot
Florian Diebold [Sun, 13 Dec 2020 12:01:55 +0000 (13:01 +0100)]
Change recommendation when source can't be loaded from sysroot

Since we just tried running `rustup component add`, it doesn't make sense to me
to recommend trying that again. If we're reaching this case, it's probably more
likely that rustc was installed via package manager, in which case the source
should be installed the same way (e.g. if you install the rust-src package on
Ubuntu it will install a symlink in the right place to make our sysroot
detection work).

3 years agoMerge #6852
bors[bot] [Sun, 13 Dec 2020 11:34:43 +0000 (11:34 +0000)]
Merge #6852

6852: Ignore lifetime params in substitutions r=matklad a=Veykril

[`hir_ty::utils::Generics`](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/utils.rs#L153) currently only assumes type parameters but not lifetime parameters and therefor creates incorrect index and length calculations, this PR just makes the use sites ignore LifetimeGenerics for now.

This fixes the panic at least locally for me for `analysis-stats`. Funnily enough this panic prevented me from using reference search for the `args` field to fix this problem.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoIgnore lifetime params in substitutions
Lukas Wirth [Sun, 13 Dec 2020 10:34:44 +0000 (11:34 +0100)]
Ignore lifetime params in substitutions

3 years agoadd a language configuration for VS Code
Dusty Pomerleau [Sat, 12 Dec 2020 00:31:00 +0000 (11:31 +1100)]
add a language configuration for VS Code

3 years agoMerge #6845
bors[bot] [Sat, 12 Dec 2020 18:06:36 +0000 (18:06 +0000)]
Merge #6845

6845: Don't HirDisplay unknown types when displaying for source r=Veykril a=Veykril

Was wondering why the add missing impl assist didn't do anything here:
![Code_JCA1Qo0V9P](https://user-images.githubusercontent.com/3757771/101990300-7af44a80-3ca6-11eb-8431-e5eb4de4e78c.png)
Turns out me forgetting to set the Index::Idx type in the trait causes RA to panic due to it trying to to create an unparsable type in the `make` module.
Now we get this instead which imo is definitely better to have.
![Code_MUFPJUCULY](https://user-images.githubusercontent.com/3757771/101990347-c9094e00-3ca6-11eb-9c6a-146bddf64b7c.png)

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't HirDisplay unknown types when displaying for source
Lukas Wirth [Sat, 12 Dec 2020 17:18:19 +0000 (18:18 +0100)]
Don't HirDisplay unknown types when displaying for source

3 years agoMerge #6846
bors[bot] [Sat, 12 Dec 2020 17:29:20 +0000 (17:29 +0000)]
Merge #6846

6846: Remove some redundant allocations r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
3 years agoRemove some redundant allocations
Jeremy Kolb [Sat, 12 Dec 2020 17:27:09 +0000 (12:27 -0500)]
Remove some redundant allocations

3 years agoMerge #6818
bors[bot] [Sat, 12 Dec 2020 14:35:38 +0000 (14:35 +0000)]
Merge #6818

6818: Add Lifetimes to the HIR r=matklad a=Veykril

This doesn't handle resolve yet as I don't know yet how that will be used. I'll get to that once I start moving the lifetime reference PR to the hir.

This also adds a new `hir` name type for lifetimes and labels, `hir::LifetimeName`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6841
bors[bot] [Sat, 12 Dec 2020 14:29:12 +0000 (14:29 +0000)]
Merge #6841

6841: Added "Remove this semicolon" test r=matklad a=ivan770

Closes https://github.com/rust-analyzer/rust-analyzer/pull/6769#discussion_r540150066

Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
3 years agoAdded remove this semicolon test
ivan770 [Sat, 12 Dec 2020 11:50:11 +0000 (13:50 +0200)]
Added remove this semicolon test

3 years agoMerge #6839
bors[bot] [Sat, 12 Dec 2020 10:18:16 +0000 (10:18 +0000)]
Merge #6839

6839: Infer labeled blocks r=flodiebold a=Veykril

The test should cover all the interesting cases I believe(main part of it is copied from the loop label break test above it).

The test is indented to stay consistent with the rest of the tests in the file, I can dedent all the tests in the file in a follow up PR if desired.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd Lifetimes to the HIR
Lukas Wirth [Fri, 11 Dec 2020 12:49:32 +0000 (13:49 +0100)]
Add Lifetimes to the HIR

3 years agoInfer labeled blocks
Lukas Wirth [Fri, 11 Dec 2020 23:03:36 +0000 (00:03 +0100)]
Infer labeled blocks

3 years agoMerge #6813
bors[bot] [Fri, 11 Dec 2020 22:17:40 +0000 (22:17 +0000)]
Merge #6813

6813: negative sign matching in mbe matching for literal r=edwin0cheng a=edwin0cheng

Fix #6292

r @jonas-schievink

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoAdd missing arg for eat_char
Edwin Cheng [Fri, 11 Dec 2020 22:14:11 +0000 (06:14 +0800)]
Add missing arg for eat_char

3 years agoMerge #6838
bors[bot] [Fri, 11 Dec 2020 22:07:11 +0000 (22:07 +0000)]
Merge #6838

6838: cargo update r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agocargo update
kjeremy [Fri, 11 Dec 2020 22:00:25 +0000 (17:00 -0500)]
cargo update

3 years agoMerge #6836
bors[bot] [Fri, 11 Dec 2020 20:32:11 +0000 (20:32 +0000)]
Merge #6836

6836: Use Attrs::docs in NavigationTarget instead of DocCommentsOwner r=kjeremy a=Veykril

That should be the last place where the AST comment machinery is referred to.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUse Attrs::docs in NavigationTarget instead of DocCommentsOwner
Lukas Wirth [Fri, 11 Dec 2020 20:19:58 +0000 (21:19 +0100)]
Use Attrs::docs in NavigationTarget instead of DocCommentsOwner

3 years agoMerge #6834
bors[bot] [Fri, 11 Dec 2020 19:57:08 +0000 (19:57 +0000)]
Merge #6834

6834: Use Attrs::docs in runnables instead of DocCommentsOwner r=kjeremy a=Veykril

I figured that we should probably move as much of the doc usage to the HIR as possible hence this PR. If we should keep this AST-based feel free to close.

This change does have the nice(but not really useful as I doubt anyones gonna write doc tests like these) side effect that these two doc string snippets allow being run now.
![image](https://user-images.githubusercontent.com/3757771/101945607-bf241400-3bee-11eb-96ce-ccae80028b1f.png)
![image](https://user-images.githubusercontent.com/3757771/101946375-2e9a0380-3bef-11eb-9950-e35168fdd048.png)

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUse Attrs::docs in runnables instead of DocCommentsOwner
Lukas Wirth [Fri, 11 Dec 2020 19:11:03 +0000 (20:11 +0100)]
Use Attrs::docs in runnables instead of DocCommentsOwner

3 years agoMerge #6832
bors[bot] [Fri, 11 Dec 2020 18:12:42 +0000 (18:12 +0000)]
Merge #6832

6832: Add upstream commit to builtin_attr.rs r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd upstream commit to builtin_attr.rs
Jonas Schievink [Fri, 11 Dec 2020 18:12:06 +0000 (19:12 +0100)]
Add upstream commit to builtin_attr.rs

3 years agoMerge #6819
bors[bot] [Fri, 11 Dec 2020 18:03:09 +0000 (18:03 +0000)]
Merge #6819

6819: Add builtin attributes for use in nameres r=jonas-schievink a=jonas-schievink

These are not yet used, but have to go through nameres later in order to support procedural macro attributes

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #6830
bors[bot] [Fri, 11 Dec 2020 17:25:16 +0000 (17:25 +0000)]
Merge #6830

6830: Avoid panic when collecting memory metrics r=jonas-schievink a=jonas-schievink

This is getting hit during metrics collection.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agometrics: go back to `cmd!`
Jonas Schievink [Fri, 11 Dec 2020 17:24:42 +0000 (18:24 +0100)]
metrics: go back to `cmd!`

3 years agoMove print_memory_usage to cli.rs
Jonas Schievink [Fri, 11 Dec 2020 17:24:27 +0000 (18:24 +0100)]
Move print_memory_usage to cli.rs

3 years agoAvoid panic when collecting memory metrics
Jonas Schievink [Fri, 11 Dec 2020 17:18:27 +0000 (18:18 +0100)]
Avoid panic when collecting memory metrics

3 years agoMerge #6829
bors[bot] [Fri, 11 Dec 2020 16:56:30 +0000 (16:56 +0000)]
Merge #6829

6829: Fix typo leading to metrics loss r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix typo leading to metrics loss
Jonas Schievink [Fri, 11 Dec 2020 16:55:52 +0000 (17:55 +0100)]
Fix typo leading to metrics loss

3 years agoMerge #6828
bors[bot] [Fri, 11 Dec 2020 16:31:13 +0000 (16:31 +0000)]
Merge #6828

6828: Metrics debugging r=jonas-schievink a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoCapture memory usage metrics
Jonas Schievink [Fri, 11 Dec 2020 16:30:32 +0000 (17:30 +0100)]
Capture memory usage metrics

3 years agoMerge #6827
bors[bot] [Fri, 11 Dec 2020 15:51:13 +0000 (15:51 +0000)]
Merge #6827

6827: Revert "Fix memory usage metrics" r=jonas-schievink a=jonas-schievink

Reverts rust-analyzer/rust-analyzer#6825

It broke metrics entirely. Will debug this later, unless someone else gets to it first.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRevert "Fix memory usage metrics"
Jonas Schievink [Fri, 11 Dec 2020 15:50:17 +0000 (16:50 +0100)]
Revert "Fix memory usage metrics"

3 years agoMerge #6824
bors[bot] [Fri, 11 Dec 2020 15:02:57 +0000 (15:02 +0000)]
Merge #6824

6824: Don't highlight parent nodes of comments on hover r=kjeremy a=Veykril

Fixes #6815

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't highlight parent nodes of comments on hover
Lukas Wirth [Fri, 11 Dec 2020 14:46:47 +0000 (15:46 +0100)]
Don't highlight parent nodes of comments on hover

3 years agoMerge #6825
bors[bot] [Fri, 11 Dec 2020 14:48:27 +0000 (14:48 +0000)]
Merge #6825

6825: Fix memory usage metrics r=jonas-schievink a=jonas-schievink

Let's see if this fixes https://github.com/rust-analyzer/rust-analyzer/issues/6808

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix memory usage metrics
Jonas Schievink [Fri, 11 Dec 2020 14:47:40 +0000 (15:47 +0100)]
Fix memory usage metrics

3 years agoMerge #6821
bors[bot] [Fri, 11 Dec 2020 14:08:22 +0000 (14:08 +0000)]
Merge #6821

6821: Improve code structure r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoImprove code structure
Aleksey Kladov [Fri, 11 Dec 2020 13:50:47 +0000 (16:50 +0300)]
Improve code structure

Make sure that there's only one entry point, analyze, remove awkard
analyzer2 name

3 years agoAdd builtin attributes for use in nameres
Jonas Schievink [Fri, 11 Dec 2020 13:04:33 +0000 (14:04 +0100)]
Add builtin attributes for use in nameres

3 years agoMerge #6816
bors[bot] [Fri, 11 Dec 2020 12:46:47 +0000 (12:46 +0000)]
Merge #6816

6816: Use natural trait ordering in derive completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse natural trait ordering in derive completion
Aleksey Kladov [Fri, 11 Dec 2020 12:41:53 +0000 (15:41 +0300)]
Use natural trait ordering in derive completion

derive(Clone, Copy) reads better than derive(Copy, Clone).

However, we preserve the reverse ordering in the lookup text for
sorting purposes. That way, it's convenient to type just `Ord` to
derive everything.

3 years agonegative sign matching in mbe matching for literal
Edwin Cheng [Fri, 11 Dec 2020 09:59:04 +0000 (17:59 +0800)]
negative sign matching in mbe matching for literal

3 years agoMerge #6807
bors[bot] [Thu, 10 Dec 2020 18:30:11 +0000 (18:30 +0000)]
Merge #6807

6807: Replicate Cargo environment variables r=jonas-schievink a=jonas-schievink

These might be relied on by procedural macros, and can also be accessed via `env!`.

Required for fixing https://github.com/rust-analyzer/rust-analyzer/issues/6696. We do not yet propagate these to any proc macros though.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoUse itertools
Jonas Schievink [Thu, 10 Dec 2020 18:29:11 +0000 (19:29 +0100)]
Use itertools

3 years agoMerge #6804
bors[bot] [Thu, 10 Dec 2020 18:14:17 +0000 (18:14 +0000)]
Merge #6804

6804: Bump the macro token limit r=jonas-schievink a=jonas-schievink

Should fix https://github.com/rust-analyzer/rust-analyzer/issues/6504

Not entirely sure what the previous limit was based on, but it looks like it does get hit in practice.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoReplicate Cargo environment variables
Jonas Schievink [Thu, 10 Dec 2020 17:51:39 +0000 (18:51 +0100)]
Replicate Cargo environment variables

3 years agoMerge #6806
bors[bot] [Thu, 10 Dec 2020 17:32:21 +0000 (17:32 +0000)]
Merge #6806

6806: Improve docs for building from source r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoImprove docs for building from source
Laurențiu Nicola [Thu, 10 Dec 2020 17:31:46 +0000 (19:31 +0200)]
Improve docs for building from source

3 years agoMerge #6805
bors[bot] [Thu, 10 Dec 2020 17:08:59 +0000 (17:08 +0000)]
Merge #6805

6805: Fix accidently quadratic syntax rewriter r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoFix accidently quadratic syntax rewriter
Aleksey Kladov [Thu, 10 Dec 2020 17:07:37 +0000 (20:07 +0300)]
Fix accidently quadratic syntax rewriter

Switching from SyntaxNode to GreenNode is a costly operation (b/c
dereferencing a synax ptr in `with_green` is linear), so we should
avoid that.

3 years agoUse decimal notation
Jonas Schievink [Thu, 10 Dec 2020 17:03:37 +0000 (18:03 +0100)]
Use decimal notation

3 years agoDouble the macro token limit
Jonas Schievink [Thu, 10 Dec 2020 16:51:39 +0000 (17:51 +0100)]
Double the macro token limit

3 years agoImprove macro limit error and move to const
Jonas Schievink [Thu, 10 Dec 2020 16:50:56 +0000 (17:50 +0100)]
Improve macro limit error and move to const

3 years agoMerge #6769
bors[bot] [Thu, 10 Dec 2020 16:18:49 +0000 (16:18 +0000)]
Merge #6769

6769: Add native "remove this semicolon" diagnostics r=matklad a=ivan770

Closes #6739
![demo2](https://user-images.githubusercontent.com/14003886/101530533-b76c3180-399a-11eb-9d18-5c8457721655.gif)

Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
3 years agoCast to ExprStmt, style fixes
ivan770 [Thu, 10 Dec 2020 16:10:39 +0000 (18:10 +0200)]
Cast to ExprStmt, style fixes

3 years agoMerge #6802
bors[bot] [Thu, 10 Dec 2020 15:32:23 +0000 (15:32 +0000)]
Merge #6802

6802: Minor, more orthogonal code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoRemove debug print
Aleksey Kladov [Thu, 10 Dec 2020 15:30:49 +0000 (18:30 +0300)]
Remove debug print

3 years agoMerge #6798
bors[bot] [Thu, 10 Dec 2020 15:08:30 +0000 (15:08 +0000)]
Merge #6798

6798: Ignore extern items in incorrect-case check r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #6801
bors[bot] [Thu, 10 Dec 2020 15:02:04 +0000 (15:02 +0000)]
Merge #6801

6801: Minor, more orthogonal code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMinor, more orthogonal code
Aleksey Kladov [Thu, 10 Dec 2020 15:00:28 +0000 (18:00 +0300)]
Minor, more orthogonal code

It's better to accept things as arguments rather than store them.

3 years agoUse mark/hit
Jonas Schievink [Thu, 10 Dec 2020 14:56:04 +0000 (15:56 +0100)]
Use mark/hit

3 years agoMerge #6797
bors[bot] [Thu, 10 Dec 2020 14:53:59 +0000 (14:53 +0000)]
Merge #6797

6797: Normalize spelling to American English r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoRemove item tree tests
Jonas Schievink [Thu, 10 Dec 2020 14:53:48 +0000 (15:53 +0100)]
Remove item tree tests

They were useful during initial development of the item tree, but
now just cause churn

3 years agoNormalize spelling to American English
Aleksey Kladov [Thu, 10 Dec 2020 14:41:57 +0000 (17:41 +0300)]
Normalize spelling to American English

3 years agoIgnore extern items in incorrect-case check
Jonas Schievink [Thu, 10 Dec 2020 14:45:01 +0000 (15:45 +0100)]
Ignore extern items in incorrect-case check

3 years agoMerge #6796
bors[bot] [Thu, 10 Dec 2020 13:17:53 +0000 (13:17 +0000)]
Merge #6796

6796: Fix FileId computation in IncorrectCase fix r=jonas-schievink a=jonas-schievink

Fixes the sub-issue mentioned in https://github.com/rust-analyzer/rust-analyzer/issues/4058#issuecomment-741919659

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix FileId computation in IncorrectCase fix
Jonas Schievink [Thu, 10 Dec 2020 13:16:34 +0000 (14:16 +0100)]
Fix FileId computation in IncorrectCase fix

3 years agoMerge #6795
bors[bot] [Thu, 10 Dec 2020 12:47:30 +0000 (12:47 +0000)]
Merge #6795

6795: format_args: handle key-value arguments r=jonas-schievink a=jonas-schievink

fixes https://github.com/rust-analyzer/rust-analyzer/issues/6728

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoformat_args: handle key-value arguments
Jonas Schievink [Thu, 10 Dec 2020 12:46:47 +0000 (13:46 +0100)]
format_args: handle key-value arguments

3 years agoMerge #6790
bors[bot] [Wed, 9 Dec 2020 19:37:55 +0000 (19:37 +0000)]
Merge #6790

6790: Send a CodeLensRefresh when we reload r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoSend a CodeLensRefresh when we reload
kjeremy [Wed, 9 Dec 2020 19:36:47 +0000 (14:36 -0500)]
Send a CodeLensRefresh when we reload

3 years agoMerge #6789
bors[bot] [Wed, 9 Dec 2020 19:26:33 +0000 (19:26 +0000)]
Merge #6789

6789: Fix a typo in manual.adoc r=lnicola a=cuviper

Co-authored-by: Josh Stone <cuviper@gmail.com>
3 years agoFix a typo in manual.adoc
Josh Stone [Wed, 9 Dec 2020 19:25:05 +0000 (11:25 -0800)]
Fix a typo in manual.adoc