]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agohir_ty: iterate_method_candidates_for_self_ty pass `visible_from_module` down to...
cynecx [Sat, 20 Mar 2021 18:48:35 +0000 (19:48 +0100)]
hir_ty: iterate_method_candidates_for_self_ty pass `visible_from_module` down to `iterate_inherent_methods`

3 years agohir_ty: fix visibility in infer_inherent_method test
cynecx [Sat, 20 Mar 2021 18:47:14 +0000 (19:47 +0100)]
hir_ty: fix visibility in infer_inherent_method test

3 years agohir_ty: introduce visible_from_module param into method resolution
cynecx [Sat, 20 Mar 2021 18:28:26 +0000 (19:28 +0100)]
hir_ty: introduce visible_from_module param into method resolution

3 years agohir_ty: check field visibility while iterating through autoderef candidates
cynecx [Sat, 20 Mar 2021 18:07:23 +0000 (19:07 +0100)]
hir_ty: check field visibility while iterating through autoderef candidates

3 years agohir_ty: add field_visibilities and fn_visibility queries
cynecx [Sat, 20 Mar 2021 17:29:30 +0000 (18:29 +0100)]
hir_ty: add field_visibilities and fn_visibility queries

3 years agohir_ty: add tests around autoderef with visibility checking
cynecx [Sat, 20 Mar 2021 16:13:58 +0000 (17:13 +0100)]
hir_ty: add tests around autoderef with visibility checking

3 years agohir_ty: fix tests by making required methods public
cynecx [Sat, 20 Mar 2021 16:12:49 +0000 (17:12 +0100)]
hir_ty: fix tests by making required methods public

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

3 years agoMerge #8081
bors[bot] [Thu, 18 Mar 2021 09:23:54 +0000 (09:23 +0000)]
Merge #8081

8081: Reorganize mbe tests r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoReorganize mbe tests
Edwin Cheng [Thu, 18 Mar 2021 09:22:52 +0000 (17:22 +0800)]
Reorganize mbe tests

3 years agoMerge #8080
bors[bot] [Thu, 18 Mar 2021 00:57:48 +0000 (00:57 +0000)]
Merge #8080

8080: Change ItemTree API to accomodate creating an ItemTree per block expression r=jonas-schievink a=jonas-schievink

...which won't go through salsa because the AST is already cached anyways

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRename `item_tree` query to `file_item_tree`
Jonas Schievink [Sat, 13 Mar 2021 01:24:26 +0000 (02:24 +0100)]
Rename `item_tree` query to `file_item_tree`

3 years agoMake `ItemTreeId` its own type
Jonas Schievink [Fri, 12 Mar 2021 23:34:01 +0000 (00:34 +0100)]
Make `ItemTreeId` its own type

3 years agoMerge #8079
bors[bot] [Thu, 18 Mar 2021 00:43:18 +0000 (00:43 +0000)]
Merge #8079

8079: Avoid cloning `CfgOptions` r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAvoid cloning `CfgOptions`
Jonas Schievink [Thu, 18 Mar 2021 00:41:38 +0000 (01:41 +0100)]
Avoid cloning `CfgOptions`

3 years agoMerge #8078
bors[bot] [Thu, 18 Mar 2021 00:30:11 +0000 (00:30 +0000)]
Merge #8078

8078: Support `#[cfg]` on all associated items r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoSupport `#[cfg]` on all associated items
Jonas Schievink [Thu, 18 Mar 2021 00:28:40 +0000 (01:28 +0100)]
Support `#[cfg]` on all associated items

3 years agoMerge #8076
bors[bot] [Wed, 17 Mar 2021 21:33:41 +0000 (21:33 +0000)]
Merge #8076

8076: Add test for self-calling inner function r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/4438 (and duplicates)

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd test for self-calling inner function
Jonas Schievink [Wed, 17 Mar 2021 21:30:09 +0000 (22:30 +0100)]
Add test for self-calling inner function

3 years agoMerge #8075
bors[bot] [Wed, 17 Mar 2021 21:25:25 +0000 (21:25 +0000)]
Merge #8075

8075: Fix `use crate as <name>;` imports r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix `use crate as <name>;` imports
Jonas Schievink [Wed, 17 Mar 2021 21:24:51 +0000 (22:24 +0100)]
Fix `use crate as <name>;` imports

3 years agoMerge #8073
bors[bot] [Wed, 17 Mar 2021 20:56:37 +0000 (20:56 +0000)]
Merge #8073

8073: Improve diagnostic when including nonexistent file r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoImprove diagnostic when including nonexistent file
Jonas Schievink [Wed, 17 Mar 2021 20:56:09 +0000 (21:56 +0100)]
Improve diagnostic when including nonexistent file

3 years agoMerge #8072
bors[bot] [Wed, 17 Mar 2021 20:42:52 +0000 (20:42 +0000)]
Merge #8072

8072: Fix "unset `OUT_DIR`" diagnostic when using it in item position r=jonas-schievink a=jonas-schievink

"load out dirs from check" is enabled by default now, but better late than never I guess.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoUse first early expansion error during nameres
Jonas Schievink [Wed, 17 Mar 2021 20:40:36 +0000 (21:40 +0100)]
Use first early expansion error during nameres

3 years agoMerge #8071
bors[bot] [Wed, 17 Mar 2021 20:08:42 +0000 (20:08 +0000)]
Merge #8071

8071: Semantic highlight intradoclinks in documentation r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSemantic highlight intradoclinks in documentation
Lukas Wirth [Wed, 17 Mar 2021 19:57:30 +0000 (20:57 +0100)]
Semantic highlight intradoclinks in documentation

3 years agoMerge #8069
bors[bot] [Wed, 17 Mar 2021 18:20:25 +0000 (18:20 +0000)]
Merge #8069

8069: Inject highlight into block doc comments r=Veykril a=Veykril

bors r+
Closes https://github.com/rust-analyzer/rust-analyzer/issues/6873

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoInject highlight into block doc comments
Lukas Wirth [Wed, 17 Mar 2021 17:59:54 +0000 (18:59 +0100)]
Inject highlight into block doc comments

3 years agoMerge #8068
bors[bot] [Wed, 17 Mar 2021 17:36:13 +0000 (17:36 +0000)]
Merge #8068

8068: Correctly handle `#[cfg]` on function parameters r=jonas-schievink a=jonas-schievink

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

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoImprove test
Jonas Schievink [Wed, 17 Mar 2021 17:35:17 +0000 (18:35 +0100)]
Improve test

3 years agoApply `#[cfg]`s when computing function signatures
Jonas Schievink [Wed, 17 Mar 2021 17:28:00 +0000 (18:28 +0100)]
Apply `#[cfg]`s when computing function signatures

3 years agoAdd test for `#[cfg]` on function params
Jonas Schievink [Wed, 17 Mar 2021 15:31:54 +0000 (16:31 +0100)]
Add test for `#[cfg]` on function params

3 years agoItemTree: lower attributes on fn parameters
Jonas Schievink [Wed, 17 Mar 2021 15:29:57 +0000 (16:29 +0100)]
ItemTree: lower attributes on fn parameters

3 years agoCorrectly parse attributes on fn parameters
Jonas Schievink [Wed, 17 Mar 2021 17:20:32 +0000 (18:20 +0100)]
Correctly parse attributes on fn parameters

3 years agoMerge #8067
bors[bot] [Wed, 17 Mar 2021 16:26:05 +0000 (16:26 +0000)]
Merge #8067

8067: Check whether cursor is on and not between intra doc links in goto_definition r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoCheck whether cursor is on and not between intra doc links in goto_definition
Lukas Wirth [Wed, 17 Mar 2021 16:24:16 +0000 (17:24 +0100)]
Check whether cursor is on and not between intra doc links in goto_definition

3 years agoMerge #8065
bors[bot] [Wed, 17 Mar 2021 16:00:43 +0000 (16:00 +0000)]
Merge #8065

8065: Better handling of block doc comments r=Veykril a=Veykril

Moves doc string processing to `Attrs::docs`, as we need the indent info from all comments before being able to know how much to strip

Closes #7774

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix incorrect newline emission in Attrs::docs
Lukas Wirth [Wed, 17 Mar 2021 15:10:58 +0000 (16:10 +0100)]
Fix incorrect newline emission in Attrs::docs

3 years agoMerge #8066
bors[bot] [Wed, 17 Mar 2021 14:12:39 +0000 (14:12 +0000)]
Merge #8066

8066: Handle `#[cfg]` on call arguments r=jonas-schievink a=jonas-schievink

This resolved the issue reported in this comment: https://github.com/rust-analyzer/rust-analyzer/issues/5649#issuecomment-789424608

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoHandle `#[cfg]` on call arguments
Jonas Schievink [Wed, 17 Mar 2021 14:08:46 +0000 (15:08 +0100)]
Handle `#[cfg]` on call arguments

3 years agoBetter handling of block doc comments
Lukas Wirth [Wed, 17 Mar 2021 13:38:11 +0000 (14:38 +0100)]
Better handling of block doc comments

3 years agoMerge #8059
bors[bot] [Wed, 17 Mar 2021 11:13:54 +0000 (11:13 +0000)]
Merge #8059

8059: Move doc-comment highlight injection from AST to HIR r=matklad,jonas-schievink a=Veykril

Fixes #5016

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>