]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoDon't allocate common visibilities
Jonas Schievink [Wed, 24 Jun 2020 13:36:18 +0000 (15:36 +0200)]
Don't allocate common visibilities

4 years agoRemove file id from item tree
Jonas Schievink [Tue, 23 Jun 2020 18:20:30 +0000 (20:20 +0200)]
Remove file id from item tree

It's not needed, and `source` is only used by tests anyways

4 years agoSlightly reduce ItemTree memory footprint
Jonas Schievink [Tue, 23 Jun 2020 17:42:19 +0000 (19:42 +0200)]
Slightly reduce ItemTree memory footprint

4 years agoMerge item tree traits
Jonas Schievink [Tue, 23 Jun 2020 16:46:08 +0000 (18:46 +0200)]
Merge item tree traits

The Source trait isn't needed anymore since we no longer merge
extern crate items with use items.

4 years agoGenerate ModItem via macro
Jonas Schievink [Tue, 23 Jun 2020 16:41:32 +0000 (18:41 +0200)]
Generate ModItem via macro

4 years agoAddress more comments
Jonas Schievink [Tue, 23 Jun 2020 16:31:14 +0000 (18:31 +0200)]
Address more comments

4 years agoif let else -> match
Jonas Schievink [Tue, 23 Jun 2020 16:28:47 +0000 (18:28 +0200)]
if let else -> match

4 years agoUnify and test attribute handling
Jonas Schievink [Tue, 23 Jun 2020 16:20:51 +0000 (18:20 +0200)]
Unify and test attribute handling

4 years agoCollect inner items in expression macros
Jonas Schievink [Tue, 23 Jun 2020 11:46:38 +0000 (13:46 +0200)]
Collect inner items in expression macros

4 years agoMeasure ItemTree query memory usage
Jonas Schievink [Tue, 23 Jun 2020 09:57:23 +0000 (11:57 +0200)]
Measure ItemTree query memory usage

4 years agoMake generics and attr queries use ItemTree
Jonas Schievink [Mon, 22 Jun 2020 17:15:54 +0000 (19:15 +0200)]
Make generics and attr queries use ItemTree

Now it's fast

4 years agoRecord HirFileId's in profiler
Jonas Schievink [Mon, 22 Jun 2020 14:59:15 +0000 (16:59 +0200)]
Record HirFileId's in profiler

4 years agoMake remaining item data queries use item tree
Jonas Schievink [Mon, 22 Jun 2020 14:41:10 +0000 (16:41 +0200)]
Make remaining item data queries use item tree

4 years agodraw the rest of the owl
Jonas Schievink [Mon, 22 Jun 2020 13:07:06 +0000 (15:07 +0200)]
draw the rest of the owl

4 years agoItemTree: Make clonable and add AST access
Jonas Schievink [Wed, 17 Jun 2020 16:43:41 +0000 (18:43 +0200)]
ItemTree: Make clonable and add AST access

4 years agoLower generics
Jonas Schievink [Wed, 17 Jun 2020 10:24:05 +0000 (12:24 +0200)]
Lower generics

4 years agoItemTree: use a newtyped ID
Jonas Schievink [Tue, 16 Jun 2020 17:20:29 +0000 (19:20 +0200)]
ItemTree: use a newtyped ID

4 years agoMove ItemTree lowering into its own module
Jonas Schievink [Tue, 16 Jun 2020 12:52:43 +0000 (14:52 +0200)]
Move ItemTree lowering into its own module

4 years agoRemove now-broken incremental test
Jonas Schievink [Mon, 15 Jun 2020 17:23:50 +0000 (19:23 +0200)]
Remove now-broken incremental test

The ItemTree tracks impl and trait items, so the CrateDefMap now needs
recomputing when those change

4 years agoRemove raw item query
Jonas Schievink [Mon, 15 Jun 2020 17:16:43 +0000 (19:16 +0200)]
Remove raw item query

4 years agoFix test
Jonas Schievink [Mon, 15 Jun 2020 17:16:29 +0000 (19:16 +0200)]
Fix test

4 years agoMove collector
Jonas Schievink [Mon, 15 Jun 2020 17:16:14 +0000 (19:16 +0200)]
Move collector

4 years agoDraw the rest of the owl
Jonas Schievink [Mon, 15 Jun 2020 17:16:02 +0000 (19:16 +0200)]
Draw the rest of the owl

4 years agocollector changes WIP
Jonas Schievink [Fri, 12 Jun 2020 21:24:26 +0000 (23:24 +0200)]
collector changes WIP

4 years agolower traits
Jonas Schievink [Fri, 12 Jun 2020 11:58:02 +0000 (13:58 +0200)]
lower traits

4 years agoHook up query, add impls, lower moar
Jonas Schievink [Thu, 11 Jun 2020 17:46:56 +0000 (19:46 +0200)]
Hook up query, add impls, lower moar

4 years agoStart item tree
Aleksey Kladov [Wed, 25 Mar 2020 14:33:01 +0000 (15:33 +0100)]
Start item tree

4 years agoMerge #5034
bors[bot] [Wed, 24 Jun 2020 14:25:56 +0000 (14:25 +0000)]
Merge #5034

5034: Cleanup project.json deserialization r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup project.json deserialization
Aleksey Kladov [Wed, 24 Jun 2020 13:52:07 +0000 (15:52 +0200)]
Cleanup project.json deserialization

4 years agoRename json_project -> project_json
Aleksey Kladov [Wed, 24 Jun 2020 12:57:37 +0000 (14:57 +0200)]
Rename json_project -> project_json

4 years agoMerge #5015 #5027 #5028
bors[bot] [Wed, 24 Jun 2020 13:02:37 +0000 (13:02 +0000)]
Merge #5015 #5027 #5028

5015: Account for updated module ids when determining whether a resolution is changed r=matklad a=Nashenas88

Fixes #4943

5027: Make Debug less verbose for VfsPath and use Display in analysis-stats r=matklad a=lnicola

5028: Remove namedExports config r=matklad a=lnicola

Fixes a warning:

```
(!) Plugin commonjs: The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.
```

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoMerge #5029
bors[bot] [Wed, 24 Jun 2020 12:52:05 +0000 (12:52 +0000)]
Merge #5029

5029: Be more explicit about absolute paths at various places r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoFix formatting issue with glob shadow test
Paul Daniel Faria [Wed, 24 Jun 2020 12:50:59 +0000 (08:50 -0400)]
Fix formatting issue with glob shadow test

4 years agoBe more explicit about absolute paths at various places
Aleksey Kladov [Wed, 24 Jun 2020 11:34:24 +0000 (13:34 +0200)]
Be more explicit about absolute paths at various places

4 years agoUse a macro in push_res to simplify code, simplify glob_shadowed_def assertion
Paul Daniel Faria [Wed, 24 Jun 2020 12:20:41 +0000 (08:20 -0400)]
Use a macro in push_res to simplify code, simplify glob_shadowed_def assertion

4 years agoRemove namedExports config
Laurențiu Nicola [Wed, 24 Jun 2020 11:09:12 +0000 (14:09 +0300)]
Remove namedExports config

4 years agoMake Debug less verbose for VfsPath and use Display in analysis-stats
Laurențiu Nicola [Wed, 24 Jun 2020 11:07:03 +0000 (14:07 +0300)]
Make Debug less verbose for VfsPath and use Display in analysis-stats

4 years agoMerge #5023
bors[bot] [Wed, 24 Jun 2020 10:40:47 +0000 (10:40 +0000)]
Merge #5023

5023: Fix string literal inference in match r=flodiebold a=lnicola

Fixes #5020

r? @flodiebold

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoMerge #5024 #5026
bors[bot] [Wed, 24 Jun 2020 10:31:20 +0000 (10:31 +0000)]
Merge #5024 #5026

5024: Simplify r=matklad a=matklad

bors r+
🤖

5026: Disable file watching when running slow tests r=matklad a=matklad

This should rid us of the intermittent test failure

https://github.com/rust-analyzer/rust-analyzer/pull/5017#issuecomment-648717983

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Wed, 24 Jun 2020 10:06:53 +0000 (12:06 +0200)]
Simplify

4 years agoDisable file watching when running slow tests
Aleksey Kladov [Wed, 24 Jun 2020 10:27:13 +0000 (12:27 +0200)]
Disable file watching when running slow tests

This should rid us of the intermittent test failure

https://github.com/rust-analyzer/rust-analyzer/pull/5017#issuecomment-648717983

4 years agoFix string literal inference in match
Laurențiu Nicola [Wed, 24 Jun 2020 09:57:28 +0000 (12:57 +0300)]
Fix string literal inference in match

4 years agoSimplify
Aleksey Kladov [Wed, 24 Jun 2020 10:01:17 +0000 (12:01 +0200)]
Simplify

4 years agoMerge #5022
bors[bot] [Wed, 24 Jun 2020 09:52:24 +0000 (09:52 +0000)]
Merge #5022

5022: Simplify r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Wed, 24 Jun 2020 09:51:45 +0000 (11:51 +0200)]
Simplify

4 years agoSimplify
Aleksey Kladov [Wed, 24 Jun 2020 09:50:53 +0000 (11:50 +0200)]
Simplify

4 years agoSimplify
Aleksey Kladov [Wed, 24 Jun 2020 09:48:44 +0000 (11:48 +0200)]
Simplify

4 years agoMerge #5021
bors[bot] [Wed, 24 Jun 2020 09:34:25 +0000 (09:34 +0000)]
Merge #5021

5021: Reduce code dupication around fixtures r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove duplication
Aleksey Kladov [Wed, 24 Jun 2020 09:31:30 +0000 (11:31 +0200)]
Remove duplication

4 years agoMore consistent usage of fixtures
Aleksey Kladov [Wed, 24 Jun 2020 09:29:43 +0000 (11:29 +0200)]
More consistent usage of fixtures

4 years agoUse fixtures more
Aleksey Kladov [Wed, 24 Jun 2020 09:05:47 +0000 (11:05 +0200)]
Use fixtures more

4 years agoMerge #5018
bors[bot] [Wed, 24 Jun 2020 08:28:59 +0000 (08:28 +0000)]
Merge #5018

5018: Simplify r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Wed, 24 Jun 2020 08:22:02 +0000 (10:22 +0200)]
Simplify

4 years agoMerge #4940
bors[bot] [Wed, 24 Jun 2020 05:22:23 +0000 (05:22 +0000)]
Merge #4940

4940: Add support for marking doctest items as distinct from normal code r=ltentrup a=Nashenas88

This adds `HighlightTag::Generic | HighlightModifier::Injected` as the default highlight for all elements within a doctest. Please feel free to suggest that a new tag be created or a different one used.

![Screenshot from 2020-06-23 09-18-13](https://user-images.githubusercontent.com/1673130/85408493-9752ce00-b532-11ea-94fe-197353ccc778.png)

Fixes #4929
Fixes #4939

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
4 years agoAccount for updated module ids when determining whether a resolution is "changed"
Paul Daniel Faria [Wed, 24 Jun 2020 02:10:01 +0000 (22:10 -0400)]
Account for updated module ids when determining whether a resolution is "changed"

4 years agoImprove readability be replacing hard-to-read if-else branches with a match
Paul Daniel Faria [Tue, 23 Jun 2020 23:35:09 +0000 (19:35 -0400)]
Improve readability be replacing hard-to-read if-else branches with a match

4 years agoMerge #5014
bors[bot] [Tue, 23 Jun 2020 22:59:22 +0000 (22:59 +0000)]
Merge #5014

5014: Use only one code-path for parsing fixtures r=matklad a=matklad

This removes leading newlines everywhere, shifting all ranges in tests
by one

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse only one code-path for parsing fixtures
Aleksey Kladov [Tue, 23 Jun 2020 22:48:38 +0000 (00:48 +0200)]
Use only one code-path for parsing fixtures

This removes leading newlines everywhere, shifting all ranges in tests
by one

4 years agoCentralize fixture parsing for assists
Aleksey Kladov [Tue, 23 Jun 2020 22:30:34 +0000 (00:30 +0200)]
Centralize fixture parsing for assists

4 years agoMerge #5008
bors[bot] [Tue, 23 Jun 2020 21:47:00 +0000 (21:47 +0000)]
Merge #5008

5008: Remove useless test code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove useless test code
Aleksey Kladov [Tue, 23 Jun 2020 11:20:53 +0000 (13:20 +0200)]
Remove useless test code

4 years agoMerge #5013
bors[bot] [Tue, 23 Jun 2020 21:34:12 +0000 (21:34 +0000)]
Merge #5013

5013: More principled indentation trimming in fixtures r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore principled indentation trimming in fixtures
Aleksey Kladov [Tue, 23 Jun 2020 20:27:24 +0000 (22:27 +0200)]
More principled indentation trimming in fixtures

4 years agoMinor, rename
Aleksey Kladov [Tue, 23 Jun 2020 19:45:40 +0000 (21:45 +0200)]
Minor, rename

4 years agoMerge #5012
bors[bot] [Tue, 23 Jun 2020 19:30:28 +0000 (19:30 +0000)]
Merge #5012

5012: Slightly better name r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSlightly better name
Aleksey Kladov [Tue, 23 Jun 2020 19:29:50 +0000 (21:29 +0200)]
Slightly better name

4 years agoMerge #5011
bors[bot] [Tue, 23 Jun 2020 18:39:58 +0000 (18:39 +0000)]
Merge #5011

5011: Simplify fixtures r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoComplicate
Aleksey Kladov [Tue, 23 Jun 2020 18:38:36 +0000 (20:38 +0200)]
Complicate

Fixing test fallout unfortunately requires more work, we need to do
it, but let's merge something at least!

4 years agoDocs for Fixture
Aleksey Kladov [Tue, 23 Jun 2020 16:58:45 +0000 (18:58 +0200)]
Docs for Fixture

4 years agoCut problematic dependency
Aleksey Kladov [Tue, 23 Jun 2020 16:56:26 +0000 (18:56 +0200)]
Cut problematic dependency

4 years agoNicer API
Aleksey Kladov [Tue, 23 Jun 2020 16:46:56 +0000 (18:46 +0200)]
Nicer API

4 years agoSimplify
Aleksey Kladov [Tue, 23 Jun 2020 16:43:55 +0000 (18:43 +0200)]
Simplify

4 years agoRemove unrelated change
Paul Daniel Faria [Tue, 23 Jun 2020 16:40:55 +0000 (12:40 -0400)]
Remove unrelated change

4 years agoSimplify
Aleksey Kladov [Tue, 23 Jun 2020 16:34:50 +0000 (18:34 +0200)]
Simplify

4 years agoSimplify
Aleksey Kladov [Tue, 23 Jun 2020 16:20:32 +0000 (18:20 +0200)]
Simplify

4 years agoDrop rarely used fixture functionality
Aleksey Kladov [Tue, 23 Jun 2020 16:17:43 +0000 (18:17 +0200)]
Drop rarely used fixture functionality

4 years agoMove fixtures to a separate file
Aleksey Kladov [Tue, 23 Jun 2020 15:59:56 +0000 (17:59 +0200)]
Move fixtures to a separate file

4 years agoUpdate comment for pop_and_inject
Paul Daniel Faria [Tue, 23 Jun 2020 16:15:45 +0000 (12:15 -0400)]
Update comment for pop_and_inject

Co-authored-by: Leander Tentrup <ltentrup@users.noreply.github.com>
4 years agoUpdate injection mechanism and stop injecting through highlight element, switch to...
Paul Daniel Faria [Tue, 23 Jun 2020 13:17:53 +0000 (09:17 -0400)]
Update injection mechanism and stop injecting through highlight element, switch to more general new highlight tag, generic

4 years agoAdd punctuation highlighting for highlighting punctuation in doctests, fix highlighti...
Paul Daniel Faria [Mon, 22 Jun 2020 14:28:07 +0000 (10:28 -0400)]
Add punctuation highlighting for highlighting punctuation in doctests, fix highlighting in doctests

4 years agoAdd default color and opacity for documentation and injected, respectively, in the...
Paul Daniel Faria [Thu, 18 Jun 2020 14:30:40 +0000 (10:30 -0400)]
Add default color and opacity for documentation and injected, respectively, in the html generator

4 years agoAdd support for marking doctest items as distinct from normal code, add default tag...
Paul Daniel Faria [Thu, 18 Jun 2020 13:37:22 +0000 (09:37 -0400)]
Add support for marking doctest items as distinct from normal code, add default tag to all doctest elements

4 years agoMerge #4976
bors[bot] [Tue, 23 Jun 2020 15:53:56 +0000 (15:53 +0000)]
Merge #4976

4976: New VFS r=matklad a=matklad

Still a draft, but mostly working already.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoNew VFS
Aleksey Kladov [Thu, 11 Jun 2020 09:04:09 +0000 (11:04 +0200)]
New VFS

4 years agoMerge #5010
bors[bot] [Tue, 23 Jun 2020 15:04:42 +0000 (15:04 +0000)]
Merge #5010

5010: Remove relative-path dependency r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove relative-path dependency
Aleksey Kladov [Tue, 23 Jun 2020 15:01:44 +0000 (17:01 +0200)]
Remove relative-path dependency

4 years agoMerge #5004
bors[bot] [Tue, 23 Jun 2020 14:55:03 +0000 (14:55 +0000)]
Merge #5004

5004: Fix panic in split/merge import assists r=matklad a=lnicola

Fixes #4368 #4905

Not sure if this is the best solution here. Maybe the `make` functions should be fallible? We generally seem to be playing whack-a-mole with panics in assists, although most of them are `unwrap`s in the assist code.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoFix panic in split and merge import assists
Laurențiu Nicola [Tue, 23 Jun 2020 06:41:43 +0000 (09:41 +0300)]
Fix panic in split and merge import assists

4 years agoMerge #5002
bors[bot] [Tue, 23 Jun 2020 13:25:43 +0000 (13:25 +0000)]
Merge #5002

5002: Fix underflow panic when doctests are at top of file r=Nashenas88 a=Nashenas88

While debugging a comment at the top of a test string, I discovered that the offset calculations could underflow and panic. This only seemed to occur in tests, I assume because it's running a debug mode. The wrapping is quickly fixed later on in release mode, which is why this seems to have gone unnoticed. The new checks ensure the value is always positive or zero.

Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
4 years agoMerge #4992 #4993 #4994 #4997 #4998
bors[bot] [Tue, 23 Jun 2020 10:09:58 +0000 (10:09 +0000)]
Merge #4992 #4993 #4994 #4997 #4998

4992: Never disable error logging on the frontend r=matklad a=Veetaha

4993: Make bootstrap error message more informative and better-fitting r=matklad a=Veetaha

Now this better fits standard vscode extension activation failure message and suggests enabling verbose logs.

![image](https://user-images.githubusercontent.com/36276403/85321828-ffbb9400-b4cd-11ea-8adf-4032b1f62dfd.png)

4994: Decouple http file stream logic from temp dir logic r=matklad a=Veetaha

Followup for #4989

4997: Update manual.adoc r=matklad a=gwutz

GNOME Builder (Nightly) supports now rust-analyzer

4998: Disrecommend trace.server: "verbose" for regular users r=matklad a=Veetaha

This option has never been useful for me, I wonder if anyone finds regular users can use this for sending logs

Co-authored-by: Veetaha <veetaha2@gmail.com>
Co-authored-by: Günther Wagner <info@gunibert.de>
4 years agoMerge #4999
bors[bot] [Tue, 23 Jun 2020 10:02:59 +0000 (10:02 +0000)]
Merge #4999

4999: SSR: Allow matching of whole macro calls r=matklad a=davidlattimore

Matching within macro calls is to come later and matching of macro calls within macro calls later still.

Co-authored-by: David Lattimore <dml@google.com>
4 years agoUpdate docs/user/manual.adoc
Günther Wagner [Tue, 23 Jun 2020 05:18:46 +0000 (07:18 +0200)]
Update docs/user/manual.adoc

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
4 years agoFix underflow panic when doctests are at top of file
Paul Daniel Faria [Tue, 23 Jun 2020 02:28:09 +0000 (22:28 -0400)]
Fix underflow panic when doctests are at top of file

4 years agoMerge #5000
bors[bot] [Mon, 22 Jun 2020 22:15:22 +0000 (22:15 +0000)]
Merge #5000

5000: Remove RelativePathBuf from fixture r=matklad a=matklad

The paths in fixture are not really relative (the default one is
`/main.rs`), so it doesn't make sense to use `RelativePathBuf` here.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove RelativePathBuf from fixture
Aleksey Kladov [Mon, 22 Jun 2020 15:30:23 +0000 (17:30 +0200)]
Remove RelativePathBuf from fixture

The paths in fixture are not really relative (the default one is
`/main.rs`), so it doesn't make sense to use `RelativePathBuf` here.

4 years agoSSR: Allow matching of whole macro calls
David Lattimore [Mon, 22 Jun 2020 08:15:51 +0000 (18:15 +1000)]
SSR: Allow matching of whole macro calls

Matching within macro calls is to come later and matching of macro calls within macro calls later still.

4 years agoDisrecommend trace.server: "verbose" for regular users
Veetaha [Mon, 22 Jun 2020 20:57:36 +0000 (23:57 +0300)]
Disrecommend trace.server: "verbose" for regular users

4 years agoUpdate manual.adoc
Günther Wagner [Mon, 22 Jun 2020 20:38:43 +0000 (22:38 +0200)]
Update manual.adoc

GNOME Builder (Nightly) supports now rust-analyzer

4 years agoDecouple http file stream logic from temp dir logic
Veetaha [Mon, 22 Jun 2020 18:36:56 +0000 (21:36 +0300)]
Decouple http file stream logic from temp dir logic

4 years agoNever disable error logging on the frontend
Veetaha [Mon, 22 Jun 2020 17:53:17 +0000 (20:53 +0300)]
Never disable error logging on the frontend