]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoIntern `TypeRef`s in the containing `ItemTree`
Jonas Schievink [Thu, 4 Feb 2021 18:19:51 +0000 (19:19 +0100)]
Intern `TypeRef`s in the containing `ItemTree`

3 years agoMerge #7555
bors[bot] [Thu, 4 Feb 2021 14:05:25 +0000 (14:05 +0000)]
Merge #7555

7555: Expander: store a LocalModuleId, not ModuleId r=jonas-schievink a=jonas-schievink

It already stores the DefMap containing the module, so having
a full ModuleId is unnecessary and makes it easier to mix things up

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoExpander: store a LocalModuleId, not ModuleId
Jonas Schievink [Thu, 4 Feb 2021 14:04:21 +0000 (15:04 +0100)]
Expander: store a LocalModuleId, not ModuleId

It already stores the DefMap containing the module, so having
a full ModuleId is unnecessary and makes it easier to mix things up

3 years agoMerge #7554
bors[bot] [Thu, 4 Feb 2021 12:45:40 +0000 (12:45 +0000)]
Merge #7554

7554: Don't keep the parent DefMap alive via Arc r=jonas-schievink a=jonas-schievink

This seems like it could easily leak a lot of memory since we don't
currently run GC

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoDon't keep the parent DefMap alive via Arc
Jonas Schievink [Thu, 4 Feb 2021 12:44:54 +0000 (13:44 +0100)]
Don't keep the parent DefMap alive via Arc

This seems like it could easily leak a lot of memory since we don't
currently run GC

3 years agoIncrease Highlights highlight range to covering element
Lukas Wirth [Thu, 4 Feb 2021 10:37:14 +0000 (11:37 +0100)]
Increase Highlights highlight range to covering element

3 years agoMerge #7553
bors[bot] [Thu, 4 Feb 2021 10:28:13 +0000 (10:28 +0000)]
Merge #7553

7553: More architecture.md r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMore architecture.md
Aleksey Kladov [Thu, 4 Feb 2021 10:27:34 +0000 (13:27 +0300)]
More architecture.md

3 years agoremove ignored test for downgrading mut to shared
Vladyslav Katasonov [Wed, 3 Feb 2021 21:52:53 +0000 (00:52 +0300)]
remove ignored test for downgrading mut to shared

3 years agoallow calling `&mut` methods on outer vars when extracing function
Vladyslav Katasonov [Wed, 3 Feb 2021 21:44:36 +0000 (00:44 +0300)]
allow calling `&mut` methods on outer vars when extracing function

3 years agoallow `&mut param` when extracting function
Vladyslav Katasonov [Wed, 3 Feb 2021 21:27:31 +0000 (00:27 +0300)]
allow `&mut param` when extracting function

Recognise &mut as variable modification.
This allows extracting functions with
`&mut var` with `var` being in outer scope

3 years agoallow modifications of vars from outer scope inside extracted function
Vladyslav Katasonov [Wed, 3 Feb 2021 20:45:03 +0000 (23:45 +0300)]
allow modifications of vars from outer scope inside extracted function

It currently allows only directly setting variable.
No `&mut` references or methods.

3 years agoallow local variables to be used after extracted body
Vladyslav Katasonov [Wed, 3 Feb 2021 17:31:12 +0000 (20:31 +0300)]
allow local variables to be used after extracted body

when variable is defined inside extracted body
export this variable to original scope via return value(s)

3 years agoMerge #7547
bors[bot] [Wed, 3 Feb 2021 18:06:55 +0000 (18:06 +0000)]
Merge #7547

7547: Split out ItemScope::dump from DefMap::dump r=jonas-schievink a=jonas-schievink

This is helpful for more targeted debugging

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoSplit out ItemScope::dump from DefMap::dump
Jonas Schievink [Wed, 3 Feb 2021 18:05:11 +0000 (19:05 +0100)]
Split out ItemScope::dump from DefMap::dump

3 years agoMerge #7546
bors[bot] [Wed, 3 Feb 2021 17:25:06 +0000 (17:25 +0000)]
Merge #7546

7546: Add newline between block and crate maps r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd newline between block and crate maps
Jonas Schievink [Wed, 3 Feb 2021 17:23:59 +0000 (18:23 +0100)]
Add newline between block and crate maps

3 years agoMerge #7545
bors[bot] [Wed, 3 Feb 2021 17:15:21 +0000 (17:15 +0000)]
Merge #7545

7545: Add a FIXME to ItemTree r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd a FIXME to ItemTree
Jonas Schievink [Wed, 3 Feb 2021 17:14:39 +0000 (18:14 +0100)]
Add a FIXME to ItemTree

3 years agoMerge #7544
bors[bot] [Wed, 3 Feb 2021 16:54:29 +0000 (16:54 +0000)]
Merge #7544

7544: Update `DefMap` and `block_def_map` docs r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoUpdate `DefMap` and `block_def_map` docs
Jonas Schievink [Wed, 3 Feb 2021 16:48:41 +0000 (17:48 +0100)]
Update `DefMap` and `block_def_map` docs

3 years agoMerge #7543
bors[bot] [Wed, 3 Feb 2021 16:20:25 +0000 (16:20 +0000)]
Merge #7543

7543: Grammar fixes r=Kushagra-0801 a=Kushagra-0801

I think line 235 is still wrong, but I am not sure.

Is the `crated/tt` in line 252 supposed to be `crates/tt`?

Co-authored-by: Kushagra Gupta <39802979+Kushagra-0801@users.noreply.github.com>
3 years agotypo fixes
Kushagra Gupta [Wed, 3 Feb 2021 16:00:42 +0000 (21:30 +0530)]
typo fixes

3 years agoGrammar fixes
Kushagra Gupta [Wed, 3 Feb 2021 15:35:21 +0000 (21:05 +0530)]
Grammar fixes

I think line 235 is still wrong, but I am not sure.

Is the `crated/tt` in line 252 supposed to be `crates/tt`?

3 years agochange TODO to FIXME
Vladyslav Katasonov [Wed, 3 Feb 2021 14:47:21 +0000 (17:47 +0300)]
change TODO to FIXME

3 years agodisable test for downgrading mutability on extract
Vladyslav Katasonov [Wed, 3 Feb 2021 14:46:57 +0000 (17:46 +0300)]
disable test for downgrading mutability on extract

3 years agoconvert IdentPat to Pat via Into
Vladyslav Katasonov [Wed, 3 Feb 2021 14:45:36 +0000 (17:45 +0300)]
convert IdentPat to Pat via Into

before child getter was used

3 years agoMerge #7541
bors[bot] [Wed, 3 Feb 2021 14:41:13 +0000 (14:41 +0000)]
Merge #7541

7541: Use block_def_map in body lowering (third time's the charm) r=jonas-schievink a=jonas-schievink

After https://github.com/rust-analyzer/rust-analyzer/pull/7380 and https://github.com/rust-analyzer/rust-analyzer/pull/7506 both had to be reverted, this should have finally resolved all remaining bugs.

Most importantly, the optimization to skip `block_def_map` computation when the block contains no inner items was fixed (which fortunately was simpler than expected).

I've ran `analysis-stats` on libstd locally, which works fine, and also ran this PR locally for a short while without issues.

Note that this *still* has no (or almost no) user-facing impact, because the rest of r-a still relies on some local item support hacks.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoTest for name resolution with DefMap shortcut
Jonas Schievink [Tue, 2 Feb 2021 14:55:33 +0000 (15:55 +0100)]
Test for name resolution with DefMap shortcut

3 years agoShortcut `block_def_map` if there's no inner items
Jonas Schievink [Mon, 1 Feb 2021 12:32:43 +0000 (13:32 +0100)]
Shortcut `block_def_map` if there's no inner items

This previously didn't work, but apparently only because of the wonky
test setup

3 years agoMerge #7539
bors[bot] [Wed, 3 Feb 2021 14:02:30 +0000 (14:02 +0000)]
Merge #7539

7539: Add cargo file tidy test r=edwin0cheng a=edwin0cheng

bors r+

cc @pksunkara

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoAdd cargo file tidy test
Edwin Cheng [Wed, 3 Feb 2021 14:01:09 +0000 (22:01 +0800)]
Add cargo file tidy test

3 years agoUse body lowering for block_def_map tests
Jonas Schievink [Mon, 1 Feb 2021 12:20:35 +0000 (13:20 +0100)]
Use body lowering for block_def_map tests

Removes the hacky and buggy custom lowering code

3 years agoUse block_def_map in body lowering
Jonas Schievink [Mon, 1 Feb 2021 12:19:55 +0000 (13:19 +0100)]
Use block_def_map in body lowering

3 years agoMerge #7538
bors[bot] [Wed, 3 Feb 2021 12:59:22 +0000 (12:59 +0000)]
Merge #7538

7538: Make sure normal dependencies always have version r=edwin0cheng a=pksunkara

How do I prevent this happening in the future by doing something in the CI? IIRC this is the second time.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
3 years agoMake sure normal dependencies always have version
Pavan Kumar Sunkara [Wed, 3 Feb 2021 12:51:07 +0000 (12:51 +0000)]
Make sure normal dependencies always have version

3 years agoMerge #7537
bors[bot] [Wed, 3 Feb 2021 12:48:13 +0000 (12:48 +0000)]
Merge #7537

7537: Fix spelling mistakes in docs/dev r=Veykril a=Veykril

Also adds a line for `crates/cfg` and `crates/stdx` to the architecture.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix spelling mistakes in docs/dev
Lukas Wirth [Wed, 3 Feb 2021 12:40:24 +0000 (13:40 +0100)]
Fix spelling mistakes in docs/dev

3 years agoMerge #7536
bors[bot] [Wed, 3 Feb 2021 11:26:49 +0000 (11:26 +0000)]
Merge #7536

7536: Make architecture more informative r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMake architecture more informative
Aleksey Kladov [Tue, 2 Feb 2021 18:59:27 +0000 (21:59 +0300)]
Make architecture more informative

Call out boundaries and invariants

3 years agosupport extracting methods; no mut lowering
Vladyslav Katasonov [Wed, 3 Feb 2021 09:27:53 +0000 (12:27 +0300)]
support extracting methods; no mut lowering

currently mut refernce will *not* be downgraded to shared
if it is sufficient(see relevant test for example)

3 years agoinitial version of extract function assist
Vladyslav Katasonov [Wed, 3 Feb 2021 07:57:11 +0000 (10:57 +0300)]
initial version of extract function assist

there are a few currently limitations:
* no modifications of function body
* does not handle mutability and references
* no method support
* may produce incorrect results

3 years agoMerge #7528
bors[bot] [Tue, 2 Feb 2021 22:18:58 +0000 (22:18 +0000)]
Merge #7528

7528: Update mimalloc r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoUpdate mimalloc
kjeremy [Tue, 2 Feb 2021 22:17:49 +0000 (17:17 -0500)]
Update mimalloc

3 years agoMerge #7525
bors[bot] [Tue, 2 Feb 2021 17:02:48 +0000 (17:02 +0000)]
Merge #7525

7525: Fix resolution of `crate` paths from within blocks r=jonas-schievink a=jonas-schievink

They resolve to the crate root, not the DefMap's root module (which
can be a block)

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix resolution of `crate` paths from within blocks
Jonas Schievink [Tue, 2 Feb 2021 17:02:12 +0000 (18:02 +0100)]
Fix resolution of `crate` paths from within blocks

They resolve to the crate root, not the DefMap's root module (which
can be a block)

3 years agoMerge #7523
bors[bot] [Tue, 2 Feb 2021 15:40:43 +0000 (15:40 +0000)]
Merge #7523

7523: Bump chalk and rustc_lexer r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoBump rustc_lexer
Laurențiu Nicola [Tue, 2 Feb 2021 15:13:49 +0000 (17:13 +0200)]
Bump rustc_lexer

3 years agoBump chalk
Laurențiu Nicola [Tue, 2 Feb 2021 15:07:10 +0000 (17:07 +0200)]
Bump chalk

3 years agoMerge #7522
bors[bot] [Tue, 2 Feb 2021 15:27:01 +0000 (15:27 +0000)]
Merge #7522

7522: Use non-deprecated memmap2 crate r=kjeremy a=kjeremy

`cargo audit` complains that `memmap` is unmaintained so switch to
RazrFalcon's maintained version.

Removes yet another edge on winapi

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoUse non-deprecated memmap2 crate
kjeremy [Tue, 2 Feb 2021 15:25:17 +0000 (10:25 -0500)]
Use non-deprecated memmap2 crate

`cargo audit` complains that `memmap` is unmaintained so switch to
RazrFalcon's maintained version.

Removes yet another edge on winapi

3 years agoMerge #7521
bors[bot] [Tue, 2 Feb 2021 15:09:34 +0000 (15:09 +0000)]
Merge #7521

7521: cargo update r=kjeremy a=kjeremy

Pulls in soundness fix from rowan.

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agocargo update
kjeremy [Tue, 2 Feb 2021 15:00:34 +0000 (10:00 -0500)]
cargo update

3 years agoMerge #7520
bors[bot] [Tue, 2 Feb 2021 14:59:29 +0000 (14:59 +0000)]
Merge #7520

7520: Show alias underlying type r=lnicola a=lumenian

Closes #7511

Display underlying type in the tooltip:
```rust
pub type SomeAlias = f64
```
instead of:
```rust
pub type SomeAlias
```

Co-authored-by: lumenian <lumenian@gmail.com>
3 years agoShow alias underlying type
lumenian [Tue, 2 Feb 2021 14:47:56 +0000 (17:47 +0300)]
Show alias underlying type

3 years agoMerge #7519
bors[bot] [Tue, 2 Feb 2021 13:09:21 +0000 (13:09 +0000)]
Merge #7519

7519: add useless types to the styleguide r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoadd useless types to the styleguide
Aleksey Kladov [Tue, 2 Feb 2021 12:41:57 +0000 (15:41 +0300)]
add useless types to the styleguide

3 years agoMerge #7518
bors[bot] [Tue, 2 Feb 2021 11:37:45 +0000 (11:37 +0000)]
Merge #7518

7518: Use the right `DefMap` when looking up modules r=jonas-schievink a=jonas-schievink

Fixes the bugs encountered in https://github.com/rust-analyzer/rust-analyzer/pull/7506#issuecomment-771417467

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoUse the right `DefMap` when looking up modules
Jonas Schievink [Tue, 2 Feb 2021 11:25:13 +0000 (12:25 +0100)]
Use the right `DefMap` when looking up modules

3 years agoMerge #7516
bors[bot] [Tue, 2 Feb 2021 10:47:22 +0000 (10:47 +0000)]
Merge #7516

7516: Revert "Use block_def_map in body lowering" r=jonas-schievink a=jonas-schievink

Reverts rust-analyzer/rust-analyzer#7506

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRevert "Use block_def_map in body lowering"
Jonas Schievink [Tue, 2 Feb 2021 10:46:58 +0000 (11:46 +0100)]
Revert "Use block_def_map in body lowering"

3 years agoMerge #7514
bors[bot] [Mon, 1 Feb 2021 20:57:26 +0000 (20:57 +0000)]
Merge #7514

7514: Only allow one proc-macro process r=edwin0cheng a=edwin0cheng

cc @lnicola

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoOnly allow one proc-macro process
Edwin Cheng [Mon, 1 Feb 2021 20:55:17 +0000 (04:55 +0800)]
Only allow one proc-macro process

3 years agoMerge #7512
bors[bot] [Mon, 1 Feb 2021 19:25:00 +0000 (19:25 +0000)]
Merge #7512

7512: Reap proc macro server instances r=lnicola a=lnicola

Fixes #7510, but not the root cause.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoReap proc macro server instances
Laurențiu Nicola [Mon, 1 Feb 2021 19:24:09 +0000 (21:24 +0200)]
Reap proc macro server instances

3 years agoMerge #7509
bors[bot] [Mon, 1 Feb 2021 18:20:53 +0000 (18:20 +0000)]
Merge #7509

7509: Improve nvim-lsp setup instructions r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoImprove nvim-lsp setup instructions
Laurențiu Nicola [Mon, 1 Feb 2021 18:20:15 +0000 (20:20 +0200)]
Improve nvim-lsp setup instructions

3 years agoMerge #7508
bors[bot] [Mon, 1 Feb 2021 16:41:52 +0000 (16:41 +0000)]
Merge #7508

7508: Don't filter code suggestions on Applicability r=lnicola a=CryZe

I've noticed that there are various suggestions that rust-analyzer seems to filter out, even if they make sense.

Here's an example of where it seems like there should be a suggestion, but there isn't:

![https://i.imgur.com/wsjM6iz.png](https://i.imgur.com/wsjM6iz.png)

It turns out that this specific suggestion is not considered `MachineApplicable`, which are the only suggestions that rust-analyzer accepts. However if you read the documentation for `MachineApplicable`,

[Source](https://github.com/rust-lang/rust/blob/b3897e3d1302391ed02efbac1dce8073646b8173/compiler/rustc_lint_defs/src/lib.rs#L27-L29)
```rust
/// The suggestion is definitely what the user intended. This suggestion should be
/// automatically applied.
MachineApplicable,
```

then you realize that these are specifically only those suggestions that rust-analyzer could even automatically apply (in some distant future, behind some setting or command or so). Other suggestions that may have some semantic impact do not use `MachineApplicable`. So all other suggestions are still intended to be suggested to the user, just not automatically applied without the user being consulted.

[Source](https://github.com/rust-lang/rust/blob/b3897e3d1302391ed02efbac1dce8073646b8173/compiler/rustc_lint_defs/src/lib.rs#L22-L24)
```rust
/// All suggestions are marked with an `Applicability`. Tools use the applicability of a suggestion
/// to determine whether it should be automatically applied or if the user should be consulted
/// before applying the suggestion.
```

So with that in mind, rust-analyzer should almost definitely not filter out `MaybeIncorrect` (which honestly is named horribly, it just means that it's a semantic change, not just a syntactical one).

Then there's `HasPlaceholders` which basically is just another semantic one, but with placeholders. The user will have to make some adjustments, but the suggestion still is perfectly valid. rust-analyzer could probably detect those placeholders and put proper "tab through" markers there for the IDE, but that's not necessary for now.

Then the last one is `Unspecified` which is so unknown that I don't even know how to judge it, meaning that the suggestion should probably also just be suggested to the user and then they can decide.

So with all that in mind, I'm proposing to get rid of the check for Applicability entirely.

Co-authored-by: Christopher Serr <christopher.serr@gmail.com>
3 years agoUpdate Test Data
Christopher Serr [Mon, 1 Feb 2021 16:36:51 +0000 (17:36 +0100)]
Update Test Data

3 years agoDon't filter code suggestions on Applicability
Christopher Serr [Mon, 1 Feb 2021 15:57:04 +0000 (16:57 +0100)]
Don't filter code suggestions on Applicability

I've noticed that there are various suggestions that rust-analyzer seems
to filter out, even if they make sense.

Here's an example of where it seems like there should be a suggestion,
but there isn't:

![https://i.imgur.com/wsjM6iz.png](https://i.imgur.com/wsjM6iz.png)

It turns out that this specific suggestion is not considered
`MachineApplicable`, which are the only suggestions that rust-analyzer
accepts. However if you read the documentation for `MachineApplicable`,

https://github.com/rust-lang/rust/blob/b3897e3d1302391ed02efbac1dce8073646b8173/compiler/rustc_lint_defs/src/lib.rs#L27-L29

then you realize that these are specifically only those suggestions that
rust-analyzer could even automatically apply (in some distant future,
behind some setting or so). Other suggestions that may have some
semantic impact do not use `MachineApplicable`. So all other suggestions
are still intended to be suggested to the user, just not automatically
applied without the user being consulted.

https://github.com/rust-lang/rust/blob/b3897e3d1302391ed02efbac1dce8073646b8173/compiler/rustc_lint_defs/src/lib.rs#L22-L24

So with that in mind, rust-analyzer should almost definitely not filter
out `MaybeIncorrect` (which honestly is named horribly, it just means
that it's a semantic change, not just a syntactical one).

Then there's `HasPlaceholders` which basically is just another semantic
one, but with placeholders. The user will have to make some adjustments,
but the suggestion still is perfectly valid. rust-analyzer could
probably detect those placeholders and put proper "tab through" markers
there for the IDE, but that's not necessary for now.

Then the last one is `Unspecified` which is so unknown that I don't even
know how to judge it, meaning that the suggestion should probably also
just be suggested to the user and then they can decide.

So with all that in mind, I'm proposing to get rid of the check for
Applicability entirely.

3 years agoMerge #7507
bors[bot] [Mon, 1 Feb 2021 14:46:56 +0000 (14:46 +0000)]
Merge #7507

7507: Explain what to do if a release fails r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoExplain what to do if a release fails
Laurențiu Nicola [Mon, 1 Feb 2021 14:43:18 +0000 (16:43 +0200)]
Explain what to do if a release fails

3 years agoMerge #7506
bors[bot] [Mon, 1 Feb 2021 12:42:31 +0000 (12:42 +0000)]
Merge #7506

7506: Use block_def_map in body lowering r=jonas-schievink a=jonas-schievink

This makes `lower_block` update the `DefMap` and `ModuleId` used by the expander to the corresponding `block_def_map`. This cleans up a bit of code, but doesn't expose any new features.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoShortcut `block_def_map` if there's no inner items
Jonas Schievink [Mon, 1 Feb 2021 12:32:43 +0000 (13:32 +0100)]
Shortcut `block_def_map` if there's no inner items

This previously didn't work, but apparently only because of the wonky
test setup

3 years agoUse body lowering for block_def_map tests
Jonas Schievink [Mon, 1 Feb 2021 12:20:35 +0000 (13:20 +0100)]
Use body lowering for block_def_map tests

Removes the hacky and buggy custom lowering code

3 years agoUse block_def_map in body lowering
Jonas Schievink [Mon, 1 Feb 2021 12:19:55 +0000 (13:19 +0100)]
Use block_def_map in body lowering

3 years agoMerge #7503
bors[bot] [Sun, 31 Jan 2021 20:13:28 +0000 (20:13 +0000)]
Merge #7503

7503: Return inner attributes of outline mod declarations in `attrs_query` r=jonas-schievink a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #7502
bors[bot] [Sun, 31 Jan 2021 20:04:07 +0000 (20:04 +0000)]
Merge #7502

7502: Honor #![macro_use] in mod source files r=jonas-schievink a=Veykril

Fixes #7501

Since `ItemTree` builds the `RawAttrs` directly we need the special check here as I don't think we can fix this in `RawAttrs` constructor as its solely AST based and we need to touch two different ASTs here.

This just made me realize that `attrs_query` suffers from a similar problem, for example hovering an outline `mod` decl won't show inner docs, only outer ones, #7503.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoReturn inner attributes of outline mod declarations in `attrs_query`
Lukas Wirth [Sun, 31 Jan 2021 18:53:01 +0000 (19:53 +0100)]
Return inner attributes of outline mod declarations in `attrs_query`

3 years agoHonor #![macro_use] in mod source files
Lukas Wirth [Sun, 31 Jan 2021 18:26:04 +0000 (19:26 +0100)]
Honor #![macro_use] in mod source files

3 years agoMerge #7500
bors[bot] [Sat, 30 Jan 2021 17:12:56 +0000 (17:12 +0000)]
Merge #7500

7500: Fix ast::String::value not properly escaping in some cases r=Veykril a=Veykril

Fixes #7496
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix ast::String::value not properly escaping in some cases
Lukas Wirth [Sat, 30 Jan 2021 15:31:19 +0000 (16:31 +0100)]
Fix ast::String::value not properly escaping in some cases

3 years agoMerge #7483
bors[bot] [Sat, 30 Jan 2021 15:23:21 +0000 (15:23 +0000)]
Merge #7483

7483: Classify function calls as functions when shadowed by types r=matklad a=Veykril

Fixes #7479

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #7494
bors[bot] [Sat, 30 Jan 2021 08:13:32 +0000 (08:13 +0000)]
Merge #7494

7494: Simpilfy mbe parsing r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoSimpilfy mbe parsing
Edwin Cheng [Sat, 30 Jan 2021 08:12:30 +0000 (16:12 +0800)]
Simpilfy mbe parsing

3 years agoMerge #7493
bors[bot] [Fri, 29 Jan 2021 18:32:10 +0000 (18:32 +0000)]
Merge #7493

7493: Add --print-config-schema to help r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoAdd --print-config-schema to help
Laurențiu Nicola [Fri, 29 Jan 2021 18:31:12 +0000 (20:31 +0200)]
Add --print-config-schema to help

3 years agoMerge #7491
bors[bot] [Fri, 29 Jan 2021 16:24:16 +0000 (16:24 +0000)]
Merge #7491

7491: Simplify mbe match error. r=edwin0cheng a=edwin0cheng

Handle parse error in rule parsing instead of matching in mbe.

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoSimplify mbe match error.
Edwin Cheng [Fri, 29 Jan 2021 16:21:43 +0000 (00:21 +0800)]
Simplify mbe match error.

Handle parse error in rule parsing instead of match in mbe

3 years agoMerge #7490
bors[bot] [Fri, 29 Jan 2021 15:13:48 +0000 (15:13 +0000)]
Merge #7490

7490: cargo update r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agocargo update
kjeremy [Fri, 29 Jan 2021 15:12:39 +0000 (10:12 -0500)]
cargo update

3 years agoPrefer ValueNS when resolving hir path for PathExpressions
Lukas Wirth [Fri, 29 Jan 2021 14:59:52 +0000 (15:59 +0100)]
Prefer ValueNS when resolving hir path for PathExpressions

3 years agoMerge #7489
bors[bot] [Fri, 29 Jan 2021 13:13:05 +0000 (13:13 +0000)]
Merge #7489

7489: :arrow_up: rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years ago:arrow_up: rowan
Aleksey Kladov [Fri, 29 Jan 2021 13:12:41 +0000 (16:12 +0300)]
:arrow_up: rowan

3 years agoMerge #7488
bors[bot] [Fri, 29 Jan 2021 12:24:38 +0000 (12:24 +0000)]
Merge #7488

7488: Rename mbe_expander for consistency r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoRename mbe_expander for consistency
Edwin Cheng [Fri, 29 Jan 2021 12:23:38 +0000 (20:23 +0800)]
Rename mbe_expander for consistency

3 years agoMerge #7487
bors[bot] [Thu, 28 Jan 2021 22:31:34 +0000 (22:31 +0000)]
Merge #7487

7487: Forbid flyimport completions in use statements r=SomeoneToIgnore a=SomeoneToIgnore

Closes #7469

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoForbid flyimport completions in use statements
Kirill Bulatov [Thu, 28 Jan 2021 22:28:54 +0000 (00:28 +0200)]
Forbid flyimport completions in use statements

3 years agoMerge #7486
bors[bot] [Thu, 28 Jan 2021 19:27:59 +0000 (19:27 +0000)]
Merge #7486

7486: :arrow_up: rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years ago:arrow_up: rowan
Aleksey Kladov [Thu, 28 Jan 2021 19:27:35 +0000 (22:27 +0300)]
:arrow_up: rowan