]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #8137
bors[bot] [Sun, 21 Mar 2021 19:25:14 +0000 (19:25 +0000)]
Merge #8137

8137: Fix box pattern inference panic r=flodiebold a=Veykril

Fixes #6560

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8134
bors[bot] [Sun, 21 Mar 2021 17:57:45 +0000 (17:57 +0000)]
Merge #8134

8134: Correct the paths of submodules from the include! macro r=edwin0cheng a=sticnarf

This PR should fix #7846. It mostly follows the instructions from @edwin0cheng in that issue.

Co-authored-by: Yilin Chen <sticnarf@gmail.com>
3 years agocheck is_include_macro only when attr_path is not specified
Yilin Chen [Sun, 21 Mar 2021 17:54:05 +0000 (01:54 +0800)]
check is_include_macro only when attr_path is not specified

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
3 years agoFix box pattern inference panic
Lukas Wirth [Sun, 21 Mar 2021 17:18:25 +0000 (18:18 +0100)]
Fix box pattern inference panic

3 years agoMerge #8133
bors[bot] [Sun, 21 Mar 2021 16:42:08 +0000 (16:42 +0000)]
Merge #8133

8133: Ignore type bindings in generic_predicates_for_param (fix panic on ena and crates depending on it) r=flodiebold a=flodiebold

This allows us to handle more cases without a query cycle, which includes certain cases that rustc accepted. That in turn means we avoid triggering salsa-rs/salsa#257 on valid code (it will still happen if the user writes an actual cycle).

We actually accept more definitions than rustc now; that's because rustc only ignores bindings when looking up super traits, whereas we now also ignore them when looking for predicates to disambiguate associated type shorthand. We could introduce a separate query for super traits if necessary, but for now I think this should be fine.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoMerge #8132
bors[bot] [Sun, 21 Mar 2021 15:57:14 +0000 (15:57 +0000)]
Merge #8132

8132: Add `'` to trigger_characters, allowing more direct lifetime completions r=Veykril a=Veykril

Fixes having to type a character after `'` to complete lifetimes and labels

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8135
bors[bot] [Sun, 21 Mar 2021 15:49:31 +0000 (15:49 +0000)]
Merge #8135

8135: more clippy::{perf, complexity, style} fixes r=Veykril a=matthiaskrgr

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
3 years agoMerge #8128
bors[bot] [Sun, 21 Mar 2021 15:21:11 +0000 (15:21 +0000)]
Merge #8128

8128: Expand legacy-scoped macro during collection r=jonas-schievink a=jonas-schievink

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

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoa lot of clippy::style fixes
Matthias Krüger [Sun, 21 Mar 2021 14:33:18 +0000 (15:33 +0100)]
a lot of clippy::style fixes

3 years agouse the included file as the source of expanded include macro
Yilin Chen [Sun, 21 Mar 2021 15:02:01 +0000 (23:02 +0800)]
use the included file as the source of expanded include macro

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
3 years agoIgnore type bindings in generic_predicates_for_param
Florian Diebold [Sat, 20 Mar 2021 19:07:36 +0000 (20:07 +0100)]
Ignore type bindings in generic_predicates_for_param

This allows us to handle more cases without a query cycle, which
includes certain cases that rustc accepted. That in turn means we avoid
triggering salsa-rs/salsa#257 on valid code (it will still happen if the
user writes an actual cycle).

We actually accept more definitions than rustc now; that's because rustc
only ignores bindings when looking up super traits, whereas we now also
ignore them when looking for predicates to disambiguate associated type
shorthand. We could introduce a separate query for super traits if
necessary, but for now I think this should be fine.

3 years agoTest for a Salsa bug
Florian Diebold [Sat, 20 Mar 2021 14:26:42 +0000 (15:26 +0100)]
Test for a Salsa bug

3 years agoclippy::complexity simplifications related to Iterators
Matthias Krüger [Sun, 21 Mar 2021 12:13:34 +0000 (13:13 +0100)]
clippy::complexity simplifications related to Iterators

3 years agoxtask: remove redundant lifetime (clippy::extra_unused_lifetimes)
Matthias Krüger [Sun, 21 Mar 2021 11:49:40 +0000 (12:49 +0100)]
xtask: remove redundant lifetime (clippy::extra_unused_lifetimes)

3 years agouse strip_prefix() instead of starts_with and slicing (clippy::manual_strip)
Matthias Krüger [Sun, 21 Mar 2021 11:38:21 +0000 (12:38 +0100)]
use strip_prefix() instead of starts_with and slicing (clippy::manual_strip)

3 years agoremove more redundant clones (clippy::redundant_clone())
Matthias Krüger [Sun, 21 Mar 2021 11:05:08 +0000 (12:05 +0100)]
remove more redundant clones (clippy::redundant_clone())

3 years agoAdd `'` to trigger_characters, allowing more direct lifetime completions
Lukas Wirth [Sun, 21 Mar 2021 10:05:04 +0000 (11:05 +0100)]
Add `'` to trigger_characters, allowing more direct lifetime completions

3 years agoMerge #8131
bors[bot] [Sun, 21 Mar 2021 09:51:06 +0000 (09:51 +0000)]
Merge #8131

8131: Do smart case fuzzy search during flyimports r=SomeoneToIgnore a=SomeoneToIgnore

For now, last actionable part of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/autoimport.20weirdness

Should help https://github.com/rust-analyzer/rust-analyzer/issues/7902

Now during the flyimport completion, if the input is searched case-sensitively, if the input contains any non-lowercase letters; otherwise the lookup done as before, case-insensitively.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoFix the profile string
Kirill Bulatov [Sat, 20 Mar 2021 22:50:59 +0000 (00:50 +0200)]
Fix the profile string

3 years agoLess reallocations
Kirill Bulatov [Sat, 20 Mar 2021 22:17:09 +0000 (00:17 +0200)]
Less reallocations

3 years agoUse smart case in flyimport items lookup
Kirill Bulatov [Sat, 20 Mar 2021 21:55:16 +0000 (23:55 +0200)]
Use smart case in flyimport items lookup

3 years agoMerge #8123
bors[bot] [Sun, 21 Mar 2021 09:37:08 +0000 (09:37 +0000)]
Merge #8123

8123: Do not display unqualified assoc item completions r=SomeoneToIgnore a=SomeoneToIgnore

Part of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/autoimport.20weirdness

Removes all flyimport completions for any unqualified associated type, effectively reverting https://github.com/rust-analyzer/rust-analyzer/pull/8095
I've explained the reasoning in the corresponding FIXME and open to discussions.
As an alternative way, we could add yet another parameter in the method that's used by the `qualify_path` and enable it for the qualify assists only.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoMerge #8130
bors[bot] [Sun, 21 Mar 2021 08:21:52 +0000 (08:21 +0000)]
Merge #8130

8130: Revert "Temporarily run git describe on CI to debug #8043" r=lnicola a=lnicola

Reverts rust-analyzer/rust-analyzer#8121

bors r+

changelog skip

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agoRevert "Temporarily run git describe on CI to debug #8043"
Laurențiu Nicola [Sun, 21 Mar 2021 08:21:29 +0000 (10:21 +0200)]
Revert "Temporarily run git describe on CI to debug #8043"

3 years agoExpand legacy-scoped macro during collection
Jonas Schievink [Sun, 21 Mar 2021 00:45:24 +0000 (01:45 +0100)]
Expand legacy-scoped macro during collection

3 years agoMerge #8127
bors[bot] [Sun, 21 Mar 2021 00:29:15 +0000 (00:29 +0000)]
Merge #8127

8127: Add label completion r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix incorrect scoping in while expressions
Lukas Wirth [Sun, 21 Mar 2021 00:10:59 +0000 (01:10 +0100)]
Fix incorrect scoping in while expressions

3 years agoMerge #8122
bors[bot] [Sun, 21 Mar 2021 00:10:14 +0000 (00:10 +0000)]
Merge #8122

8122: Make bare underscore token an Ident rather than Punct in proc-macro r=edwin0cheng a=kevinmehall

In rustc and proc-macro2, a bare `_` token is parsed for procedural macro purposes as `Ident` rather than `Punct` (see https://github.com/rust-lang/rust/pull/48842). This changes rust-analyzer to match rustc's behavior and implementation by handling `_` as an Ident in token trees, but explicitly preventing `$x:ident` from matching it in MBE.

proc macro crate:
```rust
#[proc_macro]
pub fn input(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    dbg!(input)
}
```

test crate:
```rust
test_proc_macro::input!(_);
```

output (rustc):
```rust
[test-proc-macro/src/lib.rs:10] input = TokenStream [
    Ident {
        ident: "_",
        span: #0 bytes(173..174),
    },
]
```

output (rust-analyzer before this change):
```rust
[test-proc-macro/src/lib.rs:10] input = TokenStream [
    Punct {
        ch: '_',
        spacing: Joint,
        span: 4294967295,
    },
]
```

output (rust-analyzer after this change):
```rust
[test-proc-macro/src/lib.rs:10] input = TokenStream [
    Ident {
        ident: "_",
        span: 4294967295,
    },
]
```

Co-authored-by: Kevin Mehall <km@kevinmehall.net>
3 years agoAdd label completion
Lukas Wirth [Sun, 21 Mar 2021 00:00:09 +0000 (01:00 +0100)]
Add label completion

3 years agoTrack labels in scopes
Lukas Wirth [Sat, 20 Mar 2021 23:59:45 +0000 (00:59 +0100)]
Track labels in scopes

3 years agoFix and test edge cases of `_` as ident
Kevin Mehall [Sat, 20 Mar 2021 23:43:51 +0000 (17:43 -0600)]
Fix and test edge cases of `_` as ident

3 years agoMerge #8124
bors[bot] [Sat, 20 Mar 2021 22:32:25 +0000 (22:32 +0000)]
Merge #8124

8124: Add basic lifetime completion r=Veykril a=Veykril

This adds basic lifetime completion, basic in the sense that the completions for lifetimes are only shown when the user enters `'` followed by a char. Showing them when nothing is entered is kind of a pain, as we would want them to only show up where they are useful which in turn requires a lot of tree traversal and cursor position checking to verify whether the position is valid for a lifetime. This in itself doesn't seem too bad as usually when you know you want to write a lifetime putting `'` to ask for lifetime completions seems fine.

~~I'll take a look at whether its possible to lift the restriction of having to put a char after `'`.~~ This actually already works so I guess this is the clients responsibility, in which case VSCode doesn't like it.

![TYH9gIlyVo](https://user-images.githubusercontent.com/3757771/111886437-c9b02f80-89cd-11eb-9bee-340f1536b0de.gif)

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd basic lifetime completion
Lukas Wirth [Sat, 20 Mar 2021 21:43:42 +0000 (22:43 +0100)]
Add basic lifetime completion

3 years agoMerge #8125
bors[bot] [Sat, 20 Mar 2021 22:23:50 +0000 (22:23 +0000)]
Merge #8125

8125: Don't use an untyped String for ActiveParam tracking r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't use an untyped String for ActiveParam tracking
Lukas Wirth [Sat, 20 Mar 2021 22:22:09 +0000 (23:22 +0100)]
Don't use an untyped String for ActiveParam tracking

3 years agoDisable unqualified assoc items completion for now
Kirill Bulatov [Sat, 20 Mar 2021 21:04:28 +0000 (23:04 +0200)]
Disable unqualified assoc items completion for now

3 years agoDocs
Kirill Bulatov [Sat, 20 Mar 2021 20:54:04 +0000 (22:54 +0200)]
Docs

3 years agoDo not query item search by name eagerly
Kirill Bulatov [Sat, 20 Mar 2021 13:02:52 +0000 (15:02 +0200)]
Do not query item search by name eagerly

3 years agoDo not propose assoc items without qualifiers
Kirill Bulatov [Sat, 20 Mar 2021 09:04:01 +0000 (11:04 +0200)]
Do not propose assoc items without qualifiers

3 years agoMake bare underscore token an Ident rather than Punct in proc-macro
Kevin Mehall [Sat, 20 Mar 2021 18:18:57 +0000 (12:18 -0600)]
Make bare underscore token an Ident rather than Punct in proc-macro

3 years agoMerge #8121
bors[bot] [Sat, 20 Mar 2021 17:13:03 +0000 (17:13 +0000)]
Merge #8121

8121: Temporarily run git describe on CI to debug #8043 r=lnicola a=lnicola

bors r+

changelog skip

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoTemporarily run git describe to debug #8043
Laurențiu Nicola [Sat, 20 Mar 2021 17:12:19 +0000 (19:12 +0200)]
Temporarily run git describe to debug #8043

3 years agoMerge #8119
bors[bot] [Sat, 20 Mar 2021 12:58:28 +0000 (12:58 +0000)]
Merge #8119

8119:  Don't return a SourceChange on WillRenameFiles when nothing gets refactored r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't return a SourceChange on WillRenameFiles when nothing gets refactored
Lukas Wirth [Sat, 20 Mar 2021 12:44:39 +0000 (13:44 +0100)]
Don't return a SourceChange on WillRenameFiles when nothing gets refactored

3 years agoFix add_life_to_type label typo
Lukas Wirth [Sat, 20 Mar 2021 12:44:12 +0000 (13:44 +0100)]
Fix add_life_to_type label typo

3 years agoMerge #8117
bors[bot] [Sat, 20 Mar 2021 11:47:50 +0000 (11:47 +0000)]
Merge #8117

8117: Turn Obligation into something similar to chalk_ir::DomainGoal r=flodiebold a=flodiebold

This includes starting to make use of Chalk's `Cast` trait.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoTurn Obligation into something similar to chalk_ir::DomainGoal
Florian Diebold [Sat, 20 Mar 2021 10:23:59 +0000 (11:23 +0100)]
Turn Obligation into something similar to chalk_ir::DomainGoal

This includes starting to make use of Chalk's `Cast` trait.

3 years agoMerge #8116
bors[bot] [Sat, 20 Mar 2021 10:23:55 +0000 (10:23 +0000)]
Merge #8116

8116: Remove WhereClause::Error r=flodiebold a=flodiebold

Chalk doesn't have it, and judging from the removed code, it wasn't useful anyway.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoRemove WhereClause::Error
Florian Diebold [Sat, 20 Mar 2021 09:51:00 +0000 (10:51 +0100)]
Remove WhereClause::Error

Chalk doesn't have it, and judging from the removed code, it wasn't
useful anyway.

3 years agoMerge #8115
bors[bot] [Sat, 20 Mar 2021 09:47:46 +0000 (09:47 +0000)]
Merge #8115

8115: Rename GenericPredicate -> WhereClause r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoRename GenericPredicate -> WhereClause
Florian Diebold [Sat, 20 Mar 2021 09:46:36 +0000 (10:46 +0100)]
Rename GenericPredicate -> WhereClause

3 years agoMerge #8112
bors[bot] [Fri, 19 Mar 2021 21:20:43 +0000 (21:20 +0000)]
Merge #8112

8112: Revamp `hir_def` attribute API r=Veykril a=jonas-schievink

This adds `AttrsWithOwner`, which can construct an accurate `AttrSourceMap` without requiring additional information from the caller.

r? @Veykril

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd `AttrsWithOwner` and clean up `source_map`
Jonas Schievink [Fri, 19 Mar 2021 20:23:57 +0000 (21:23 +0100)]
Add `AttrsWithOwner` and clean up `source_map`

3 years agoMove `AttrsOwnerNode` to syntax and make it public
Jonas Schievink [Fri, 19 Mar 2021 18:42:06 +0000 (19:42 +0100)]
Move `AttrsOwnerNode` to syntax and make it public

3 years agoMerge #8111
bors[bot] [Fri, 19 Mar 2021 18:56:38 +0000 (18:56 +0000)]
Merge #8111

8111: Return `Either` from `MacroDefId::ast_id` r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoReturn `Either` from `MacroDefId::ast_id`
Jonas Schievink [Fri, 19 Mar 2021 18:56:13 +0000 (19:56 +0100)]
Return `Either` from `MacroDefId::ast_id`

3 years agoMerge #8110
bors[bot] [Fri, 19 Mar 2021 18:01:34 +0000 (18:01 +0000)]
Merge #8110

8110: simplify r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agosimplify
Aleksey Kladov [Fri, 19 Mar 2021 18:00:20 +0000 (21:00 +0300)]
simplify

changelog skip

3 years agoMerge #8109
bors[bot] [Fri, 19 Mar 2021 17:54:30 +0000 (17:54 +0000)]
Merge #8109

8109: Make ast editing more ergonomic r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMake ast editing more ergonomic
Aleksey Kladov [Fri, 19 Mar 2021 17:46:18 +0000 (20:46 +0300)]
Make ast editing more ergonomic

changelog internal

3 years agoMerge #8108
bors[bot] [Fri, 19 Mar 2021 17:25:09 +0000 (17:25 +0000)]
Merge #8108

8108: Fix handling of `#![cfg]` in outline module file r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix handling of `#![cfg]` in outline module file
Jonas Schievink [Fri, 19 Mar 2021 17:24:04 +0000 (18:24 +0100)]
Fix handling of `#![cfg]` in outline module file

3 years agoMerge #8106
bors[bot] [Fri, 19 Mar 2021 13:34:46 +0000 (13:34 +0000)]
Merge #8106

8106: Add builtin macro-like attributes r=jonas-schievink a=jonas-schievink

We also have to know about these to resolve them

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd builtin macro-like attributes
Jonas Schievink [Fri, 19 Mar 2021 13:33:31 +0000 (14:33 +0100)]
Add builtin macro-like attributes

3 years agoMerge #8104
bors[bot] [Fri, 19 Mar 2021 13:23:56 +0000 (13:23 +0000)]
Merge #8104

8104: Rename derive-specific APIs r=jonas-schievink a=jonas-schievink

Indicate that they're derive-specific

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRename derive-specific APIs
Jonas Schievink [Fri, 19 Mar 2021 13:23:13 +0000 (14:23 +0100)]
Rename derive-specific APIs

3 years agoMerge #8102
bors[bot] [Fri, 19 Mar 2021 12:13:21 +0000 (12:13 +0000)]
Merge #8102

8102: Cleanup qualify_path r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoCleanup qualify_path
Lukas Wirth [Fri, 19 Mar 2021 12:12:00 +0000 (13:12 +0100)]
Cleanup qualify_path

3 years agoMerge #8097
bors[bot] [Fri, 19 Mar 2021 11:38:40 +0000 (11:38 +0000)]
Merge #8097

8097: Parse extended_key_value_attributes r=jonas-schievink a=Veykril

Companion PR https://github.com/rust-analyzer/ungrammar/pull/31

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8101
bors[bot] [Fri, 19 Mar 2021 11:12:54 +0000 (11:12 +0000)]
Merge #8101

8101: Replace Projection variant in GenericPredicate with AliasEq r=flodiebold a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoReplace Projection variant in GenericPredicate with AliasEq
Lukas Wirth [Fri, 19 Mar 2021 01:07:15 +0000 (02:07 +0100)]
Replace Projection variant in GenericPredicate with AliasEq

3 years agoParse extended_key_value_attributes
Lukas Wirth [Thu, 18 Mar 2021 21:25:10 +0000 (22:25 +0100)]
Parse extended_key_value_attributes

3 years agoMerge #8099
bors[bot] [Thu, 18 Mar 2021 23:07:41 +0000 (23:07 +0000)]
Merge #8099

8099: Document fields of `ModuleId` r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoDocument fields of `ModuleId`
Jonas Schievink [Thu, 18 Mar 2021 23:06:35 +0000 (00:06 +0100)]
Document fields of `ModuleId`

3 years agoMerge #8095
bors[bot] [Thu, 18 Mar 2021 21:40:12 +0000 (21:40 +0000)]
Merge #8095

8095: Fix associated items not being appended to paths in import_assets r=SomeoneToIgnore a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8086
bors[bot] [Thu, 18 Mar 2021 21:32:34 +0000 (21:32 +0000)]
Merge #8086

8086: Use a highlight modifier for intra doc links r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUse a highlight modifier for intra doc links
Lukas Wirth [Thu, 18 Mar 2021 14:22:27 +0000 (15:22 +0100)]
Use a highlight modifier for intra doc links

3 years agoMerge #8096
bors[bot] [Thu, 18 Mar 2021 20:54:24 +0000 (20:54 +0000)]
Merge #8096

8096: Chalkify TraitRef r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3 years agoChalkify TraitRef
Florian Diebold [Thu, 18 Mar 2021 20:53:19 +0000 (21:53 +0100)]
Chalkify TraitRef

3 years agoFix associated items not being appended to paths in import_assets
Lukas Wirth [Thu, 18 Mar 2021 20:36:52 +0000 (21:36 +0100)]
Fix associated items not being appended to paths in import_assets

3 years agoMerge #8083
bors[bot] [Thu, 18 Mar 2021 19:26:10 +0000 (19:26 +0000)]
Merge #8083

8083: Track source file IDs in source mapping of Attrs r=jonas-schievink a=Veykril

Fixes the panics/incorrect injection highlighting of outline module declarations until we figure out a nicer source mapping strategy for attributes.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #8094
bors[bot] [Thu, 18 Mar 2021 19:16:05 +0000 (19:16 +0000)]
Merge #8094

8094: Fix infinite recursion when computing diagnostics for inner items r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix infinite recursion when computing diagnostics for inner items
Jonas Schievink [Thu, 18 Mar 2021 19:15:06 +0000 (20:15 +0100)]
Fix infinite recursion when computing diagnostics for inner items

3 years agoMerge #8093
bors[bot] [Thu, 18 Mar 2021 19:05:20 +0000 (19:05 +0000)]
Merge #8093

8093: Record custom derive helpers in `DefMap` r=jonas-schievink a=jonas-schievink

Also clean up proc macro attribute parsing a bit

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd test
Jonas Schievink [Thu, 18 Mar 2021 19:04:20 +0000 (20:04 +0100)]
Add test

3 years agoRecord custom derive helpers in `DefMap`
Jonas Schievink [Thu, 18 Mar 2021 18:56:37 +0000 (19:56 +0100)]
Record custom derive helpers in `DefMap`

Also clean up proc macro attribute parsing a bit

3 years agoMerge #8091
bors[bot] [Thu, 18 Mar 2021 16:24:38 +0000 (16:24 +0000)]
Merge #8091

8091: Add test for goto def on proc macro invocation r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd test for goto def on proc macro invocation
Jonas Schievink [Thu, 18 Mar 2021 16:23:51 +0000 (17:23 +0100)]
Add test for goto def on proc macro invocation

3 years agoMerge #8089
bors[bot] [Thu, 18 Mar 2021 15:58:05 +0000 (15:58 +0000)]
Merge #8089

8089: Update info about Eclipse Corrosion r=matklad a=mickaelistria

Co-authored-by: Mickael Istria <mistria@redhat.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUpdate docs/user/manual.adoc
Aleksey Kladov [Thu, 18 Mar 2021 15:57:44 +0000 (18:57 +0300)]
Update docs/user/manual.adoc

3 years agoUpdate info about Eclipse Corrosion
Mickael Istria [Thu, 18 Mar 2021 15:22:54 +0000 (16:22 +0100)]
Update info about Eclipse Corrosion

3 years agoMerge #8088
bors[bot] [Thu, 18 Mar 2021 15:13:03 +0000 (15:13 +0000)]
Merge #8088

8088: Store an `AstId` for procedural macros r=jonas-schievink a=jonas-schievink

Point `HasSource` to the `ast::Fn`, and go to it in `TryToNav`.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoStore an `AstId` for procedural macros
Jonas Schievink [Thu, 18 Mar 2021 15:11:18 +0000 (16:11 +0100)]
Store an `AstId` for procedural macros

3 years agoMerge #8087
bors[bot] [Thu, 18 Mar 2021 14:38:04 +0000 (14:38 +0000)]
Merge #8087

8087: Make MacroDefId's `AstId` mandatory when possible r=jonas-schievink a=jonas-schievink

This makes it clearer (in the type definition) which macros have or don't have an `AstId`

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMake MacroDefId's `AstId` mandatory when possible
Jonas Schievink [Thu, 18 Mar 2021 14:37:14 +0000 (15:37 +0100)]
Make MacroDefId's `AstId` mandatory when possible

3 years agoMerge #8085
bors[bot] [Thu, 18 Mar 2021 14:15:29 +0000 (14:15 +0000)]
Merge #8085

8085: Create AstId for builtin_derive macro in tests r=jonas-schievink a=jonas-schievink

This moves them closer to the builtin_macro tests

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoCreate AstId for builtin_derive macro in tests
Jonas Schievink [Thu, 18 Mar 2021 14:14:52 +0000 (15:14 +0100)]
Create AstId for builtin_derive macro in tests

3 years agoMerge #8082
bors[bot] [Thu, 18 Mar 2021 12:25:44 +0000 (12:25 +0000)]
Merge #8082

8082: Proper handle inner recursive macro rules cases r=edwin0cheng a=edwin0cheng

Fixes #7645

cc @jonas-schievink

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoHandle inner recursive macro rules cases
Edwin Cheng [Thu, 18 Mar 2021 11:39:40 +0000 (19:39 +0800)]
Handle inner recursive macro rules cases

3 years agoTrack source file IDs in source mapping of Attrs
Lukas Wirth [Thu, 18 Mar 2021 12:16:27 +0000 (13:16 +0100)]
Track source file IDs in source mapping of Attrs