Commit Graph

26827 Commits

Author SHA1 Message Date
bors
7204ee1262 Auto merge of #16163 - Veykril:goto-impl-fix, r=Veykril
fix: Deduplicate annotations

Fixes https://github.com/rust-lang/rust-analyzer/issues/16157
2023-12-19 07:50:23 +00:00
Lukas Wirth
002e611d09 fix: Deduplicate annotations 2023-12-19 08:49:00 +01:00
Sanjaiyan Parthipan
f587b54340
perf: Run async task in concurrent 2023-12-19 13:16:55 +05:30
bors
dbd0b035e6 Auto merge of #16155 - Waqar144:work/fix-16142, r=lnicola
fix: Dont assume ascii in remove_markdown

Fixes #16142
2023-12-19 07:22:46 +00:00
bors
1c4c2200eb Auto merge of #16160 - Waqar144:work/use-reserve, r=Veykril
minor: Use reserve when removing markdown from text

After markdown syntax removal the length of the text is roughly the same so we can reserve memory beforehand
2023-12-19 07:11:20 +00:00
bors
484525f8d7 Auto merge of #16158 - saiintbrisson:fix/mbe/desugar-comment-to-raw-string, r=Veykril
fix(mbe): desugar doc correctly for mbe

Fixes #16110.

The way rust desugars doc comments when expanding macros is rendering it as raw strings delimited with hashes. Rust-analyzer wasn't aware of this, so the desugared doc comments wouldn't match correctly when on the LHS of macro declarations.

This PR fixes this by porting the code used by rustc:
59096cdad0/compiler/rustc_ast/src/tokenstream.rs (L662-L671)
2023-12-19 07:00:35 +00:00
bors
f1d09c9c7c Auto merge of #16159 - Waqar144:work/simplify, r=Veykril
minor: use a single push_str instead of 2 push
2023-12-19 06:49:22 +00:00
Waqar Ahmed
13177e314d minor: Use reserve when removing markdown from text
After markdown syntax removal the length of the text is roughly the
same so we can reserve memory beforehand
2023-12-19 11:22:02 +05:00
Waqar Ahmed
9f4d26901b minor: use a single push_str instead of 2 push 2023-12-19 11:17:09 +05:00
Luiz Carvalho
6f58e98f2c
fix(mbe): update test 2023-12-19 01:03:00 -03:00
Luiz Carvalho
117a28a065
fix(mbe): desugar doc correctly for mbe
Fixes #16110.

The way rust desugars doc comments when expanding macros
is rendering it as raw strings delimited with hashes.
Rust-analyzer wasn't aware of this, so the desugared doc
comments wouldn't match correctly when on the LHS of macro
declarations.

This PR fixes this by porting the code used by rustc: 4cfdbd328b/compiler/rustc_ast/src/tokenstream.rs (L6837)
2023-12-19 00:55:56 -03:00
Waqar Ahmed
5318e89b8a fix: Dont assume ascii in remove_markdown
Fixes #16142
2023-12-19 01:27:36 +05:00
bors
0ed815faca Auto merge of #16151 - lnicola:minimal-2024-edition, r=davidbarsky
internal: Add minimal support for the 2024 edition

CC #16146
2023-12-18 17:33:20 +00:00
Laurențiu Nicola
fec0e04fc2 Add minimal support for the 2024 edition 2023-12-18 17:10:20 +02:00
bors
f6635211ce Auto merge of #16152 - Austaras:alias, r=Veykril
fix: resolve alias before resolve variant

Closes #15943 (again)
2023-12-18 15:08:36 +00:00
austaras
bd61888b8d fix: resolve alias before resolve variant 2023-12-18 22:31:58 +08:00
bors
ae2c3223b0 Auto merge of #16150 - Veykril:text-fixture, r=Veykril
internal: Move out `WithFixture` into dev-dep only crate
2023-12-18 14:26:51 +00:00
Lukas Wirth
f49a2fed3f internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
bors
5daf09082a Auto merge of #16149 - lnicola:ignore-missing-prs, r=lnicola
internal: Don't fail changelog generation on missing PRs

One year later 😅.
2023-12-18 14:15:10 +00:00
Laurențiu Nicola
60281a6135 Don't fail changelog generation on missing PRs 2023-12-18 16:07:37 +02:00
bors
bd03f92579 Auto merge of #16147 - lnicola:no-ap-sourcegen, r=lnicola
minor: Don't auto-publish sourcegen

Closes #16029
2023-12-18 14:03:38 +00:00
Laurențiu Nicola
66fa1c965e Don't auto-publish sourcegen 2023-12-18 15:54:01 +02:00
bors
038086984c Auto merge of #16145 - Veykril:span-crate, r=Veykril
internal: Split out a span crate

Allows getting rid of some of the dependency injection generics that my rewrite introduced
2023-12-18 13:52:04 +00:00
Lukas Wirth
ec6162308e Move the SpanMap definition into the span crate 2023-12-18 14:50:48 +01:00
Lukas Wirth
66e29be1bd internal: Split out a span crate 2023-12-18 14:08:33 +01:00
bors
cfc959d73a Auto merge of #16143 - Veykril:base-db-no-proc-macros, r=lnicola
internal: Move proc-macro knowledge out of base-db into hir-expand

It does not make much sense to me to have that live in base-db, additionally, it kind of conflicts with moving span things out into a separate crate
2023-12-18 12:18:24 +00:00
bors
9a82f8ce52 Auto merge of #16144 - lnicola:sync-from-rust, r=lnicola
internal: sync from downstream
2023-12-18 12:04:26 +00:00
Laurențiu Nicola
e628f1715e Merge branch 'master' into sync-from-rust 2023-12-18 14:02:12 +02:00
Lukas Wirth
35620306a6 internal: Move proc-macro knowledge out of base-db 2023-12-18 12:37:18 +01:00
Laurențiu Nicola
e37cf75791 Merge commit '21b06c1beb9bb59369ffd652f5d617bcf6952e05' into sync-from-ra 2023-12-18 09:21:55 +02:00
bors
cac74d98f6 Auto merge of #118830 - GuillaumeGomez:env-tracked_env, r=Nilstrieb
Add support for `--env` on `tracked_env::var`

Follow-up of https://github.com/rust-lang/rust/pull/118368.
Part of Part of https://github.com/rust-lang/rust/issues/80792.

It adds support of the `--env` option for proc-macros through `tracked_env::var`.

r? `@Nilstrieb`
2023-12-17 04:23:08 +00:00
unexge
3b8801c3ac Go to definition for macros in #[macro_use(...)] 2023-12-16 18:00:29 +00:00
unexge
0e4902467f Add missing docs string 2023-12-16 17:10:11 +00:00
unexge
b986d8ac92 Complete exported macros in #[macro_use($0)] 2023-12-16 16:19:58 +00:00
bors
21b06c1beb Auto merge of #16131 - HKalbasi:rustc-tests-fixup, r=HKalbasi
Fix false positive type mismatch in const reference patterns
2023-12-15 15:42:00 +00:00
hkalbasi
fa5a327786 Use depth 1 in git clone 2023-12-15 19:09:42 +03:30
hkalbasi
4f722165b6 Fix false positive type mismatch in const reference patterns 2023-12-15 19:09:07 +03:30
bors
a7764198b1 Auto merge of #16123 - Veykril:simplify, r=Veykril
internal: Remove `ModuleId` from `TypeOwnerId`

It only exists due to the IDE layer, but we can encode this temporary hack more cleanly
2023-12-15 13:10:17 +00:00
bors
34d572e236 Auto merge of #16130 - Veykril:syntax-fixup, r=Veykril
fix: Syntax fixup now removes subtrees with fake spans

Fixes https://github.com/rust-lang/rust-analyzer/issues/16118
2023-12-15 12:58:43 +00:00
Lukas Wirth
4c45d23948 fix: Syntax fixup now removes subtrees with fake spans 2023-12-15 13:52:49 +01:00
bors
96f660813c Auto merge of #16125 - HKalbasi:rustc-tests, r=HKalbasi
Run rust-analyzer on rustc tests in metrics

fix #15947
2023-12-14 22:42:05 +00:00
hkalbasi
7b9595a5ab Run rust-analyzer on rustc tests in metrics 2023-12-15 02:10:25 +03:30
Lukas Wirth
9083017c9d Remove ModuleId from TypeOwnerId 2023-12-14 14:11:57 +01:00
bors
35e2f13b5c Auto merge of #16121 - Veykril:assert-messages, r=Veykril
minor: Add messages to some asserts for better debugging

cc https://github.com/rust-lang/rust-analyzer/issues/16118
2023-12-14 09:27:14 +00:00
Lukas Wirth
070cd4e8b0 minor: Add messages to some asserts for better debugging 2023-12-14 10:24:41 +01:00
bors
dd07f1f2fb Auto merge of #15887 - jinohkang-theori:fix/ide-assists/convert_tuple_struct_to_named_struct/handle_refs_inside_macro_invocations, r=Veykril
Fix incorrectly replacing references in macro invocation in "Convert to named struct" assist

Fixes #15630.

Complements #13647 (same assist but missed this one), #14920 (inverse action assist).
2023-12-13 21:30:18 +00:00
bors
f81bd0cc71 Auto merge of #16115 - HKalbasi:rustc-tests-fixup, r=lnicola
Update builtin attrs from rustc

Fix #16105

r? `@lnicola` since you did this last time.
2023-12-13 17:55:04 +00:00
hkalbasi
6a40400c13 Update builtin attrs from rustc 2023-12-13 21:18:24 +03:30
bors
94af6c63b7 Auto merge of #16061 - Veykril:vec-completion, r=Veykril
fix: Fix fragment parser replacing matches with dummies on incomplete parses

Notably, this caused some completions in the `vec!` macro to no longer work. Fixes https://github.com/rust-lang/rust-analyzer/issues/15016
2023-12-13 09:59:13 +00:00
bors
b3af1916cc Auto merge of #16107 - Veykril:rev-16101, r=Veykril
internal: Partially revert #16101

https://github.com/rust-lang/rust-analyzer/pull/16101 has severe perf regressions unfortunately, so this reverts the part that fixed the issues for now.
2023-12-12 21:55:01 +00:00