Commit graph

14660 commits

Author SHA1 Message Date
bors[bot]
71fe719dd5
Merge #7374
7374: Add step to run analysis-stats on std r=lnicola a=tweksteen

Run `analysis-stats` on `std` as part of the release workflow. Uses the `--with-deps` to also parse other crates defined in `stdlibs`. Remove the condition for exection, both analysis will be run for nightly and release builds.

Do not submit until #6956 has been fixed.

Bug: #6956

Co-authored-by: Thiébaud Weksteen <tweek@google.com>
2021-01-22 13:58:26 +00:00
bors[bot]
c050e972a3
Merge #7386
7386: Handle box with allocator r=flodiebold a=tweksteen

In 1.49.0, the definition of Box was modified to support an optional
Allocator[1]. Adapt the parsing of the `box` keyword to supply the
expected number of parameters to the constructor.

[1] f288cd2e17

Fixes: #6956 


Co-authored-by: Thiébaud Weksteen <tweek@google.com>
2021-01-22 13:14:40 +00:00
Thiébaud Weksteen
be0691b02b Handle box with allocator
In 1.49.0, the definition of Box was modified to support an optional
Allocator[1]. Adapt the parsing of the `box` keyword to supply the
expected number of parameters to the constructor.

[1] f288cd2e17
2021-01-22 13:50:23 +01:00
bors[bot]
eba9756458
Merge #7390
7390: Style: use the right string r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-22 12:42:55 +00:00
bors[bot]
1b96c79ab5
Merge #7348
7348: Fix broken link in intra-doc r=edwin0cheng a=sasurau4

Fix #5546 
The intra-doc link doesn't work fine for trait associated method.

Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
2021-01-22 12:29:42 +00:00
Aleksey Kladov
4c92ef03ac Style: use the right string 2021-01-22 15:29:31 +03:00
bors[bot]
3cd994d8a5
Merge #7389
7389: Remove approximate goto def r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-22 12:14:23 +00:00
Aleksey Kladov
f67a2eedf5 Cleanup tests 2021-01-22 15:13:18 +03:00
Aleksey Kladov
2c786f1b98 Remove index based fallback for goto def
We are so precise that the fallback creates more confusion, when you can
goto def on an unresolved reference.
2021-01-22 15:11:29 +03:00
bors[bot]
2ca9cb3753
Merge #7388
7388: Minor fix for #7387 r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-01-22 11:52:23 +00:00
Edwin Cheng
eb2cb6b01f Use AbsPath 2021-01-22 19:51:14 +08:00
bors[bot]
6403b530bb
Merge #7387
7387: Refactor build script specific data r=edwin0cheng a=edwin0cheng

It refactors for separating logic for build script specific data. 

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-01-22 11:15:22 +00:00
Edwin Cheng
6bdb6786ba Refactor build script data 2021-01-22 19:11:01 +08:00
Daiki Ihara
f5b97e52c9 Fix broken link in intra-doc 2021-01-22 20:06:45 +09:00
bors[bot]
2472851ccf
Merge #7384
7384: Remove unused field r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 20:12:58 +00:00
Jonas Schievink
8916b0c6cb Remove unused field 2021-01-21 21:12:26 +01:00
bors[bot]
585816c166
Merge #7383
7383: Add test for path resolution bug r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 19:36:08 +00:00
Jonas Schievink
4d19607057 Add test for path resolution bug 2021-01-21 20:35:36 +01:00
bors[bot]
a162083099
Merge #7382
7382: Cargo update r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-01-21 19:06:43 +00:00
kjeremy
486066417a Cargo update 2021-01-21 14:00:42 -05:00
bors[bot]
7caa9d694a
Merge #7381
7381: Revert "Make use of `block_def_map` in body lowering" r=jonas-schievink a=jonas-schievink

Reverts rust-analyzer/rust-analyzer#7380, since it broke stuff

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 18:04:58 +00:00
Jonas Schievink
3f4f253028
Revert "Make use of block_def_map in body lowering" 2021-01-21 19:04:31 +01:00
bors[bot]
e76d8c1d9a
Merge #7378
7378: Include `countme` crate to count important data structures. r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-21 17:46:44 +00:00
bors[bot]
b68d6d6fd5
Merge #7380
7380: Make use of `block_def_map` in body lowering r=jonas-schievink a=jonas-schievink

Removes the `local_scope` argument from `Expander` in favor of tracking the `DefMap` in use during body lowering.

For now, we still collect inner items as usual, because other code still relies on `item_scope`.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 17:09:05 +00:00
Jonas Schievink
cdb0e25aaa Make use of block_def_map in body lowering
Removes the `local_scope` hack from `Expander` in favor of tracking the
`DefMap` in use during body lowering
2021-01-21 18:05:52 +01:00
Aleksey Kladov
e5c5c0a040 Include countme crate to count important data structures. 2021-01-21 19:30:52 +03:00
bors[bot]
bbc6298600
Merge #7377
7377: Remove unnecessary annotations from tests r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 16:20:17 +00:00
Jonas Schievink
d157a03e93 Remove unnecessary annotations from tests 2021-01-21 17:19:46 +01:00
bors[bot]
235583f3fc
Merge #7376
7376: Add test for nameres in nested blocks r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 15:43:53 +00:00
Jonas Schievink
4e603b7947 Add test for nameres in nested blocks 2021-01-21 16:42:56 +01:00
bors[bot]
47a70aadce
Merge #7375
7375: Add support for running name resolution in block expressions r=jonas-schievink a=jonas-schievink

This adds a `block_def_map` query that runs the name resolution algorithm on a block expression, and returns a `DefMap` that stores links to the parent `DefMap` (either the containing block or the crate-level `DefMap`). Blocks with no inner items return the parent's `DefMap` as-is, to avoid creating unnecessarily long `DefMap` chains.

Path resolution is updated to recurse into the parent `DefMap` after looking up a path in the original `DefMap`.

I've added a few new tests for this, but outside of those this isn't used yet.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-21 15:28:40 +00:00
Jonas Schievink
ec4a1dc297 Add test that merges inner and outer names 2021-01-21 16:23:50 +01:00
Jonas Schievink
d62c9c6c63 Fix lowering with multiple block expressions 2021-01-21 16:23:22 +01:00
Thiébaud Weksteen
9a68c7f6c7 Add step to run analysis-stats on std 2021-01-21 15:37:10 +01:00
bors[bot]
323138f32e
Merge #7372
7372: Up lexer r=kjeremy a=kjeremy

No real changes here.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-01-21 14:32:57 +00:00
kjeremy
f006517857 Up lexer 2021-01-21 09:31:06 -05:00
Jonas Schievink
f8f44cfb9b Fall back to parent DefMaps when resolving paths 2021-01-21 15:24:15 +01:00
Jonas Schievink
896dfacfc4 Add name resolution query for block expressions 2021-01-21 15:22:17 +01:00
bors[bot]
cde22aba1c
Merge #7371
7371: Change directory before running rustfmt to respect rustfmt.toml r=matklad a=lnicola

Fixes #6973

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-21 14:15:14 +00:00
Laurențiu Nicola
c067ca505a chdir to file before rustfmt 2021-01-21 15:58:17 +02:00
bors[bot]
0045d7c6db
Merge #7370
7370: fix mega bug r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-21 13:38:28 +00:00
Aleksey Kladov
feb252138d Fix mega bug
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Manual.20content.20is.20duplicated
2021-01-21 16:37:46 +03:00
bors[bot]
64a92e2328
Merge #7368
7368: Clarify enabled features and defined features in PackageData r=matklad a=edwin0cheng



Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-01-21 11:30:38 +00:00
Edwin Cheng
ac3ec18f4b Added defined_features in PackageData 2021-01-21 19:12:19 +08:00
bors[bot]
cc53252e87
Merge #7367
7367: Bump chalk r=lnicola a=lnicola

Fixes #6945
Fixes #6812

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-21 08:33:25 +00:00
Laurențiu Nicola
e42dfd7a40 Bump chalk 2021-01-21 10:29:19 +02:00
bors[bot]
70f7a10013
Merge #7366
7366: Treat BlockExpr as a potential module origin r=jonas-schievink a=jonas-schievink

A block containing inner items acts like the root module of a crate, so it needs to be representable as a `ModuleSource` and `ModuleOrigin`.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-20 22:07:38 +00:00
Jonas Schievink
82146737ac Treat BlockExpr as a potential module origin 2021-01-20 20:05:48 +01:00
bors[bot]
7d5ed18c42
Merge #7365
7365: chalk 0.49.0 r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-01-20 17:35:15 +00:00
kjeremy
1e0b163860 chalk 0.49.0 2021-01-20 12:31:03 -05:00