]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #6921
bors[bot] [Sun, 20 Dec 2020 11:47:01 +0000 (11:47 +0000)]
Merge #6921

6921: Higher-ranked trait bounds for where clauses r=flodiebold a=Veykril

There is a slight problem with this which is also noted in a FIXME now but `LifetimeParameters` of these ForLifetime where clauses allocate the lifetimes in the corresponding arena as if they were lifetimes of the item itself and not just the clause they belong to. I wasn't entirely sure what I could do about this but given nothing really uses lifetimes like that currently I figured it might be fine? Open to suggestions for that problem.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6958
bors[bot] [Sun, 20 Dec 2020 07:06:55 +0000 (07:06 +0000)]
Merge #6958

6958: Align code_model name with ungrammar r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAlign code_model name with ungrammar
Aleksey Kladov [Sun, 20 Dec 2020 07:05:24 +0000 (10:05 +0300)]
Align code_model name with ungrammar

3 years agoMerge #6929
bors[bot] [Sun, 20 Dec 2020 06:33:19 +0000 (06:33 +0000)]
Merge #6929

6929: Handle $_ in mbe r=edwin0cheng a=lnicola

Fixes #6926

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agombe: treat _ as ident
Laurențiu Nicola [Fri, 18 Dec 2020 15:47:48 +0000 (17:47 +0200)]
mbe: treat _ as ident

3 years agoMerge #6954
bors[bot] [Sat, 19 Dec 2020 19:05:43 +0000 (19:05 +0000)]
Merge #6954

6954: cargo update r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
3 years agocargo update
Jeremy Kolb [Sat, 19 Dec 2020 19:04:31 +0000 (14:04 -0500)]
cargo update

3 years agoMerge #6953
bors[bot] [Sat, 19 Dec 2020 18:56:50 +0000 (18:56 +0000)]
Merge #6953

6953: Add test_rename_bind_pat r=bjorn3 a=bjorn3

Fixes #2976

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
3 years agoAdd test_rename_bind_pat
bjorn3 [Sat, 19 Dec 2020 18:37:19 +0000 (19:37 +0100)]
Add test_rename_bind_pat

3 years agoMerge #6946
bors[bot] [Sat, 19 Dec 2020 18:43:20 +0000 (18:43 +0000)]
Merge #6946

6946: Better fuzzy heuristics r=matklad a=SomeoneToIgnore

Continuation of the https://github.com/rust-analyzer/rust-analyzer/pull/6922, mainly created for a test.

Turns out our current completions tests were sorting the completions by label, I had to remove that to test the order properly and update this order in a bunch of tests (ergo the changes)

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoFewer allocations
Kirill Bulatov [Sat, 19 Dec 2020 18:42:16 +0000 (20:42 +0200)]
Fewer allocations

3 years agoMerge #6951
bors[bot] [Sat, 19 Dec 2020 15:48:09 +0000 (15:48 +0000)]
Merge #6951

6951: Make sure that HighlightModifier::ALL is synchronized with enum r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMake sure that HighlightModifier::ALL is synchronized with enum
Aleksey Kladov [Sat, 19 Dec 2020 15:46:42 +0000 (18:46 +0300)]
Make sure that HighlightModifier::ALL is synchronized with enum

3 years agoMerge #6948
bors[bot] [Sat, 19 Dec 2020 14:25:33 +0000 (14:25 +0000)]
Merge #6948

6948: Add API for mapping `Attr` back to its syntax node r=jonas-schievink a=jonas-schievink

This will be useful for emitting diagnostics pertaining to a specific attribute

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #6949
bors[bot] [Sat, 19 Dec 2020 14:19:13 +0000 (14:19 +0000)]
Merge #6949

6949: Clarify the meaning of no-op highlight tag r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoClarify the meaning of no-op highlight tag
Aleksey Kladov [Sat, 19 Dec 2020 14:16:05 +0000 (17:16 +0300)]
Clarify the meaning of no-op highlight tag

3 years agoAdd API for mapping `Attr` back to its syntax node
Jonas Schievink [Sat, 19 Dec 2020 14:15:02 +0000 (15:15 +0100)]
Add API for mapping `Attr` back to its syntax node

3 years agoMerge #6947
bors[bot] [Sat, 19 Dec 2020 14:12:07 +0000 (14:12 +0000)]
Merge #6947

6947: Use more Rustic highlighting specifiers r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse more Rustic highlighting specifiers
Aleksey Kladov [Sat, 19 Dec 2020 14:10:47 +0000 (17:10 +0300)]
Use more Rustic highlighting specifiers

*Method* works for OO languages, but in rust we can also have
associated constants & types, so let's move this to a modifier.

3 years agoTidy up
Kirill Bulatov [Sat, 19 Dec 2020 11:27:10 +0000 (13:27 +0200)]
Tidy up

3 years agoKeep the original completion order in tests
Kirill Bulatov [Sat, 19 Dec 2020 11:18:40 +0000 (13:18 +0200)]
Keep the original completion order in tests

3 years agoAdd a slightly better fuzzy search heuristics
Kirill Bulatov [Sat, 19 Dec 2020 10:54:17 +0000 (12:54 +0200)]
Add a slightly better fuzzy search heuristics

3 years agoMerge #6944
bors[bot] [Sat, 19 Dec 2020 01:52:51 +0000 (01:52 +0000)]
Merge #6944

6944: Make attribute API more private r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMake `RawAttrs` crate-private
Jonas Schievink [Sat, 19 Dec 2020 01:44:00 +0000 (02:44 +0100)]
Make `RawAttrs` crate-private

There should be no need to use this from outside

3 years agoRemove `Attrs::merge`
Jonas Schievink [Sat, 19 Dec 2020 01:43:00 +0000 (02:43 +0100)]
Remove `Attrs::merge`

Only the `RawAttrs` version of this is in use

3 years agoMerge #6943
bors[bot] [Sat, 19 Dec 2020 01:33:23 +0000 (01:33 +0000)]
Merge #6943

6943: Remove resolved FIXME r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove resolved FIXME
Jonas Schievink [Sat, 19 Dec 2020 01:32:31 +0000 (02:32 +0100)]
Remove resolved FIXME

3 years agoMerge #6942
bors[bot] [Sat, 19 Dec 2020 00:13:27 +0000 (00:13 +0000)]
Merge #6942

6942: Minor `#[derive]` resolution cleanup r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agofixture -> ra_fixture
Jonas Schievink [Sat, 19 Dec 2020 00:12:41 +0000 (01:12 +0100)]
fixture -> ra_fixture

3 years agoTest paths to derive macros
Jonas Schievink [Sat, 19 Dec 2020 00:11:33 +0000 (01:11 +0100)]
Test paths to derive macros

3 years agoMore accurate `#[derive]` parsing
Jonas Schievink [Sat, 19 Dec 2020 00:09:48 +0000 (01:09 +0100)]
More accurate `#[derive]` parsing

This now allows full paths to the derive macro

3 years agoMerge #6937
bors[bot] [Fri, 18 Dec 2020 20:05:20 +0000 (20:05 +0000)]
Merge #6937

6937: Deduplicate highlight tags and symbol kinds r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoDeduplicate highlight tags and symbol kinds
Aleksey Kladov [Fri, 18 Dec 2020 20:00:43 +0000 (23:00 +0300)]
Deduplicate highlight tags and symbol kinds

Curiously, LSP uses different enums for those, and unsurprising and
annoyingly, there are things which exist in one but not in the other.

Let's not repeat the mistake and unify the two things

3 years agoMerge #6935
bors[bot] [Fri, 18 Dec 2020 19:38:07 +0000 (19:38 +0000)]
Merge #6935

6935: Don't look at attributes when lowering to ItemTree r=jonas-schievink a=jonas-schievink

Resolves 2 `cfg_attr` FIXMEs

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoDon't look at attributes when lowering to ItemTree
Jonas Schievink [Fri, 18 Dec 2020 19:37:26 +0000 (20:37 +0100)]
Don't look at attributes when lowering to ItemTree

Resolves 2 `cfg_attr` FIXMEs

3 years agoMerge #6934
bors[bot] [Fri, 18 Dec 2020 19:27:18 +0000 (19:27 +0000)]
Merge #6934

6934: Implement `cfg_attr` handling r=jonas-schievink a=jonas-schievink

Part of https://github.com/rust-analyzer/rust-analyzer/issues/5548

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoHit a mark
Jonas Schievink [Fri, 18 Dec 2020 19:25:41 +0000 (20:25 +0100)]
Hit a mark

3 years agoAdd test
Jonas Schievink [Fri, 18 Dec 2020 19:01:02 +0000 (20:01 +0100)]
Add test

3 years agoFix parsing of active cfg_attr
Jonas Schievink [Fri, 18 Dec 2020 19:00:59 +0000 (20:00 +0100)]
Fix parsing of active cfg_attr

3 years agoMerge #6933
bors[bot] [Fri, 18 Dec 2020 18:27:28 +0000 (18:27 +0000)]
Merge #6933

6933: Reduce test verbosity r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoReduce test verbosity
Aleksey Kladov [Fri, 18 Dec 2020 18:26:47 +0000 (21:26 +0300)]
Reduce test verbosity

3 years agoNavTarget doesn't assume that it points to a symbol
Aleksey Kladov [Fri, 18 Dec 2020 18:10:13 +0000 (21:10 +0300)]
NavTarget doesn't assume that it points to a symbol

3 years agoImplement `RawAttr::filter`
Jonas Schievink [Fri, 18 Dec 2020 17:58:42 +0000 (18:58 +0100)]
Implement `RawAttr::filter`

3 years agoMerge #6932
bors[bot] [Fri, 18 Dec 2020 17:48:41 +0000 (17:48 +0000)]
Merge #6932

6932: Added a warning if conflicting rust-lang.rust is enabled. r=lnicola a=extremegf

Added a warning if conflicting rust-lang.rust plugin is enabled.

Resolves #6463

![Screenshot from 2020-12-18 18-33-02](https://user-images.githubusercontent.com/1788593/102644202-b2f50500-4160-11eb-8fb0-76aeebd80aea.png)

Co-authored-by: Przemyslaw Horban <p.horban@invinets.com>
3 years agoFixed formatting
Przemyslaw Horban [Fri, 18 Dec 2020 17:47:03 +0000 (18:47 +0100)]
Fixed formatting

3 years agoAdded a warning if conflicting rust-lang.rust is enabled.
Przemyslaw Horban [Fri, 18 Dec 2020 17:39:51 +0000 (18:39 +0100)]
Added a warning if conflicting rust-lang.rust is enabled.

3 years agoMerge #6931
bors[bot] [Fri, 18 Dec 2020 16:50:26 +0000 (16:50 +0000)]
Merge #6931

6931: Minor, cleanup API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMinor, cleanup API
Aleksey Kladov [Fri, 18 Dec 2020 16:50:00 +0000 (19:50 +0300)]
Minor, cleanup API

3 years agoMerge #6930
bors[bot] [Fri, 18 Dec 2020 16:29:12 +0000 (16:29 +0000)]
Merge #6930

6930: Don't expose SyntaxKind from IDE API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoDon't expose SyntaxKind from IDE API
Aleksey Kladov [Thu, 17 Dec 2020 11:29:05 +0000 (14:29 +0300)]
Don't expose SyntaxKind from IDE API

SyntaxKind is somewhat of an internal type, but IDE is using it to
basically specify an icon. Let's have a dedicated entity for this
instead.

3 years agoCleaup imports
Aleksey Kladov [Thu, 17 Dec 2020 11:17:13 +0000 (14:17 +0300)]
Cleaup imports

ide should re-export everything it needs.

3 years agoMerge #6927
bors[bot] [Fri, 18 Dec 2020 14:32:53 +0000 (14:32 +0000)]
Merge #6927

6927: Do not merge imports with different attributes r=lnicola a=Jesse-Bakker

Fixes #6925

Co-authored-by: Jesse Bakker <github@jessebakker.com>
3 years agoDo not merge imports with different attributes
Jesse Bakker [Fri, 18 Dec 2020 13:30:56 +0000 (14:30 +0100)]
Do not merge imports with different attributes

3 years agoMerge #6901
bors[bot] [Fri, 18 Dec 2020 02:30:51 +0000 (02:30 +0000)]
Merge #6901

6901: Temp fixes panic caused by no ast for proc-macro r=maklad a=edwin0cheng

There are some panic when hover/goto definition for proc-macro. It is because in current design, we don't have `ast-node` for proc-macro and then it trigger [this](https://github.com/rust-analyzer/rust-analyzer/blob/479d1f7eec22c3564867223e2093f14774092528/crates/hir/src/has_source.rs#L116) line to panic.

This PR is a temp fix for all of these similar to https://github.com/rust-analyzer/rust-analyzer/blob/bd4c352831662762ee7a66da77ec9adf623b0a0a/crates/completion/src/render/macro_.rs#L42

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoTemp fixes panic caused by no ast for proc-macro
Edwin Cheng [Fri, 18 Dec 2020 02:26:17 +0000 (10:26 +0800)]
Temp fixes panic caused by no ast for proc-macro

3 years agoMerge #6924
bors[bot] [Fri, 18 Dec 2020 01:25:27 +0000 (01:25 +0000)]
Merge #6924

6924: Refactor attributes API to allow handling cfg_attr later r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRefactor attributes API to allow handling cfg_attr
Jonas Schievink [Thu, 17 Dec 2020 23:23:46 +0000 (00:23 +0100)]
Refactor attributes API to allow handling cfg_attr

3 years agoMerge #6922
bors[bot] [Thu, 17 Dec 2020 21:19:31 +0000 (21:19 +0000)]
Merge #6922

6922: Show first fuzzy completions fully containing the input r=matklad a=SomeoneToIgnore

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoShow first fuzzy completions fully containing the input
Kirill Bulatov [Thu, 17 Dec 2020 21:10:10 +0000 (23:10 +0200)]
Show first fuzzy completions fully containing the input

3 years agoHigher-ranked trait bounds for where clauses
Lukas Wirth [Thu, 17 Dec 2020 21:01:42 +0000 (22:01 +0100)]
Higher-ranked trait bounds for where clauses

3 years agoMerge #6912
bors[bot] [Thu, 17 Dec 2020 18:32:13 +0000 (18:32 +0000)]
Merge #6912

6912: Default to host platform for cargo metadata r=jonhoo a=jonhoo

This modifies the logic for calling cargo metadata so that it will use
the host platform if no explicit target platform is given. This is
needed since cargo metadata defaults to outputting information for _all_
targets.

Fixes #6908.

Co-authored-by: Jon Gjengset <jongje@amazon.com>
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
3 years agoFun times with rustfmt
Jon Gjengset [Thu, 17 Dec 2020 18:24:58 +0000 (10:24 -0800)]
Fun times with rustfmt

3 years agoUpdate crates/project_model/src/cargo_workspace.rs
Jon Gjengset [Thu, 17 Dec 2020 18:18:23 +0000 (13:18 -0500)]
Update crates/project_model/src/cargo_workspace.rs

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMerge #6920
bors[bot] [Thu, 17 Dec 2020 17:18:50 +0000 (17:18 +0000)]
Merge #6920

6920: Minor API cleanup r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMinor API cleanup
Aleksey Kladov [Thu, 17 Dec 2020 17:14:13 +0000 (20:14 +0300)]
Minor API cleanup

3 years agoMerge #6919
bors[bot] [Thu, 17 Dec 2020 17:12:09 +0000 (17:12 +0000)]
Merge #6919

6919: Rewrite doctest runnables r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoRewrite doctest runnables
Aleksey Kladov [Thu, 17 Dec 2020 16:29:31 +0000 (19:29 +0300)]
Rewrite doctest runnables

Handle more cases in a generic way without copy-pasting code.

3 years agoMinor code style
Aleksey Kladov [Thu, 17 Dec 2020 15:27:24 +0000 (18:27 +0300)]
Minor code style

3 years agoMerge #6779
bors[bot] [Thu, 17 Dec 2020 16:35:11 +0000 (16:35 +0000)]
Merge #6779

6779: Latest LSP 3.16 r=kjeremy a=kjeremy

Companion to gluon-lang/lsp-types#192

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoLSP 3.16 - Released
kjeremy [Wed, 9 Dec 2020 01:56:43 +0000 (20:56 -0500)]
LSP 3.16 - Released

3 years agoMerge #6916
bors[bot] [Thu, 17 Dec 2020 14:57:51 +0000 (14:57 +0000)]
Merge #6916

6916: Make `Attrs::from_attrs_owner` private r=matklad a=jonas-schievink

It is only meant for use inside `hir` crates.

Removes `docs_from_symbol`, which didn't seem to have any visible effect in VS Code.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMake `Attrs::from_attrs_owner` private
Jonas Schievink [Thu, 17 Dec 2020 14:45:26 +0000 (15:45 +0100)]
Make `Attrs::from_attrs_owner` private

3 years agoMerge #6915
bors[bot] [Thu, 17 Dec 2020 13:30:09 +0000 (13:30 +0000)]
Merge #6915

6915: Add `AttrDefId::krate` r=jonas-schievink a=jonas-schievink

Access to the containing crate will be needed to handle `cfg_attr`.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd `AttrDefId::krate`
Jonas Schievink [Thu, 17 Dec 2020 13:29:29 +0000 (14:29 +0100)]
Add `AttrDefId::krate`

Access to the containing crate will be needed to handle `cfg_attr`

3 years agoRemove obsolete FIXME
Lukas Wirth [Thu, 17 Dec 2020 12:40:11 +0000 (13:40 +0100)]
Remove obsolete FIXME

3 years agoMerge #6914
bors[bot] [Thu, 17 Dec 2020 11:37:34 +0000 (11:37 +0000)]
Merge #6914

6914: Rename ImplDef -> Impl r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoRename ImplDef -> Impl
Aleksey Kladov [Thu, 17 Dec 2020 11:36:15 +0000 (14:36 +0300)]
Rename ImplDef -> Impl

We used to have `Def` suffix for all symbols, but we moved off from
that. `FunctionDef` isn't better than `Function`. Looks like we've
forgot to change `Impl` though!

3 years agoMerge #6907
bors[bot] [Thu, 17 Dec 2020 11:00:39 +0000 (11:00 +0000)]
Merge #6907

6907: Lifetime reference search  r=matklad a=Veykril

PR #6787 but rewritten to make use of the HIR now. This only applies to Lifetimes, not labels. Also Higher-Ranked Trait Bounds aren't supported yet, but I feel like this PR is big enough as is which is why I left them out after noticing I forgot about them.

Supporting renaming required slight changes in the renaming module as lifetime names aren't allowed for anything but lifetimes(and labels) and vice versa for normal names.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6911
bors[bot] [Thu, 17 Dec 2020 10:27:28 +0000 (10:27 +0000)]
Merge #6911

6911: decl_check: don't pass `db` around so often r=matklad a=jonas-schievink

Instead, store it in the `DeclValidator`.

Also pass the `CrateId` that defines the checked item along. This is not yet needed, but will be once I've refactored `Attrs` to handle `cfg_attr` internally.

We could also try to extract the crate from the "owner" `ModuleDefId` instead of passing it in, but then it might not be present for builtin types. Open to suggestions.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoDefault to host platform for cargo metadata
Jon Gjengset [Thu, 17 Dec 2020 01:38:21 +0000 (17:38 -0800)]
Default to host platform for cargo metadata

This modifies the logic for calling cargo metadata so that it will use
the host platform if no explicit target platform is given. This is
needed since cargo metadata defaults to outputting information for _all_
targets.

Fixes #6908.

3 years agodecl_check: don't pass `db` around so often
Jonas Schievink [Thu, 17 Dec 2020 00:19:56 +0000 (01:19 +0100)]
decl_check: don't pass `db` around so often

3 years agoMerge #6910
bors[bot] [Wed, 16 Dec 2020 23:32:01 +0000 (23:32 +0000)]
Merge #6910

6910: Remove `module_lang_items` r=jonas-schievink a=jonas-schievink

It isn't used anywhere except in `crate_lang_items`. Remove it to
slightly reduce memory usage and simplify the code.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove `module_lang_items`
Jonas Schievink [Wed, 16 Dec 2020 23:26:01 +0000 (00:26 +0100)]
Remove `module_lang_items`

It isn't used anywhere except in `crate_lang_items`. Remove it to
slightly reduce memory usage and simplify the code.

3 years agoMerge #6909
bors[bot] [Wed, 16 Dec 2020 22:42:54 +0000 (22:42 +0000)]
Merge #6909

6909: Avoid querying attributes in item tree lowering r=jonas-schievink a=jonas-schievink

ItemTree is per-file, so there is no unique crate associated with it.
This means that it cannot know the active CfgOptions and thus couldn't
handle `cfg_attr`.

Prepare it for `cfg_attr`s by avoiding accessing attributes.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAvoid querying attributes in item tree lowering
Jonas Schievink [Wed, 16 Dec 2020 22:42:03 +0000 (23:42 +0100)]
Avoid querying attributes in item tree lowering

ItemTree is per-file, so there is no unique crate associated with it.
This means that it cannot know the active CfgOptions and thus couldn't
handle `cfg_attr`.

Prepare it for `cfg_attr`s by avoiding accessing attributes.

3 years agoLifetime reference search
Lukas Wirth [Wed, 16 Dec 2020 20:35:15 +0000 (21:35 +0100)]
Lifetime reference search

3 years agoMerge #6896
bors[bot] [Wed, 16 Dec 2020 17:08:03 +0000 (17:08 +0000)]
Merge #6896

6896: Node-ify lifetimes r=jonas-schievink a=Veykril

Let's see if this passes the tests 🤞

Depends on https://github.com/rust-analyzer/ungrammar/pull/15

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6897
bors[bot] [Wed, 16 Dec 2020 16:52:46 +0000 (16:52 +0000)]
Merge #6897

6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink

This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore.

First steps for https://github.com/rust-analyzer/rust-analyzer/issues/2248.

Blocked on https://github.com/rust-analyzer/ungrammar/pull/16.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
3 years agoMerge #6906
bors[bot] [Wed, 16 Dec 2020 15:07:47 +0000 (15:07 +0000)]
Merge #6906

6906: Document new permissions r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUpdate docs/dev/README.md
Aleksey Kladov [Wed, 16 Dec 2020 15:07:21 +0000 (18:07 +0300)]
Update docs/dev/README.md

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDocument new permissions
Aleksey Kladov [Wed, 16 Dec 2020 15:03:15 +0000 (18:03 +0300)]
Document new permissions

3 years agoNode-ify lifetimes
Lukas Wirth [Tue, 15 Dec 2020 18:23:51 +0000 (19:23 +0100)]
Node-ify lifetimes

3 years agoUnpatch ungrammar
Jonas Schievink [Wed, 16 Dec 2020 11:54:34 +0000 (12:54 +0100)]
Unpatch ungrammar

3 years agoMerge #6861
bors[bot] [Wed, 16 Dec 2020 08:36:05 +0000 (08:36 +0000)]
Merge #6861

6861: generate default implementation for an enum from an enum variant #6860 r=matklad a=bnjjj

close #6860

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
3 years agoMerge #6894
bors[bot] [Wed, 16 Dec 2020 08:20:11 +0000 (08:20 +0000)]
Merge #6894

6894: Parenthesize composite if condition before inverting in invert-if assist r=matklad a=Jesse-Bakker

Fixes #6867

Co-authored-by: Jesse Bakker <github@jessebakker.com>
3 years agogenerate default implementation for an enum from an enum variant #6860
Benjamin Coenen [Tue, 15 Dec 2020 20:35:41 +0000 (21:35 +0100)]
generate default implementation for an enum from an enum variant #6860

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
3 years agoMake macro def krate mandatory
Jonas Schievink [Tue, 15 Dec 2020 19:33:05 +0000 (20:33 +0100)]
Make macro def krate mandatory

Refactors builtin derive support to go through proper name resolution

3 years agoBasic support for decl macros 2.0
Jonas Schievink [Tue, 15 Dec 2020 17:43:19 +0000 (18:43 +0100)]
Basic support for decl macros 2.0

3 years agoMerge #6879
bors[bot] [Tue, 15 Dec 2020 17:22:03 +0000 (17:22 +0000)]
Merge #6879

6879: Change HasChildSource::ChildId assoc item to generic param r=matklad a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoChange HasChildSource::ChildId assoc item to generic param
Lukas Wirth [Mon, 14 Dec 2020 16:11:27 +0000 (17:11 +0100)]
Change HasChildSource::ChildId assoc item to generic param