Tetsuharu Ohzeki
edda6b8a1f
mbe: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
bors
66cec4d11a
Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
...
internal: Lint debug prints and disallowed types with clippy
2024-02-05 17:20:43 +00:00
GnomedDev
8011b56827
Swap Subtree::token_trees from Vec to boxed slice
2024-02-04 00:28:22 +00:00
Young-Flash
ba2910a3a7
minor: correct some typos
2024-02-02 18:22:54 +08:00
Lukas Wirth
9e8a0fae0c
Lint debug prints and disallowed types with clippy
2024-02-01 17:57:27 +01:00
Young-Flash
db9fd370ee
minor: correct typos
2024-01-30 21:43:43 +08:00
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Lukas Wirth
5a343415e8
Add some size assertions
2024-01-26 19:28:39 +01:00
Johann Hemmann
0df30499d0
only_used_in_recursion
2024-01-19 17:31:01 +01:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Lukas Wirth
83591268ab
minor: Make use of some new SmolStr
improvements
2024-01-17 13:47:15 +01:00
bors
337e2abb67
Auto merge of #16167 - Veykril:dummy-spans, r=Veykril
...
fix: Fully remove dummy spans
Fixes https://github.com/rust-lang/rust-analyzer/issues/16008
Some of these spans are certainly wrong, but since we discard invisible delimiters currently it doesn't really matter.
2023-12-20 13:33:36 +00:00
Lukas Wirth
f211a40f1f
Remove SyntaxContext trait
2023-12-20 14:02:40 +01:00
Lukas Wirth
7b804552a5
Remove Delimiter::DUMMY_INVISIBLE
2023-12-20 14:00:14 +01:00
Lukas Wirth
2c6ce480e3
Remove Delimier::dummy_invisible
2023-12-20 13:06:46 +01:00
Lukas Wirth
4ec81230db
Remove usages of Span::DUMMY
2023-12-20 12:53:46 +01:00
bors
7bdf48ce37
Auto merge of #16165 - Veykril:meta-vars, r=Veykril
...
fix: Update metavariable expression implementation
Fixes https://github.com/rust-lang/rust-analyzer/issues/16154
This duplicates behavior of that before and after PR https://github.com/rust-lang/rust/pull/117050 based on the toolchain version. There are some 1.76 nightlies that are still broken (any before that PR basically) but fetching and storing the commit makes little sense to me (opposed to the toolchain version).
2023-12-20 10:30:58 +00:00
Lukas Wirth
f48ecb6e09
Try to support pre and post-change metavars
2023-12-19 20:45:12 +01:00
Lukas Wirth
8753ca5360
fix: Update metavariable expression implementation
2023-12-19 11:55:00 +01: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
Lukas Wirth
66e29be1bd
internal: Split out a span crate
2023-12-18 14:08:33 +01:00
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
Lukas Wirth
c209b5f97c
fix: Fix syntax bridge assigning invalid span to lifetime tokens
2023-12-12 22:05:21 +01:00
Lukas Wirth
5f957658c1
fix: Fix fragment parser replacing matches with dummies on incomplete parses
2023-12-08 20:39:16 +01:00
Lukas Wirth
71337f6682
fix: Fix concat_bytes!
expansion
2023-12-08 11:34:03 +01:00
Lukas Wirth
d2cd30007c
Implicit format args support
2023-12-05 17:07:00 +01:00
Igor Matuszewski
a7224c998d
Don't explicitly warn against semicolon_in_expressions_from_macros
...
This has been warn-by-default for two years now and has already been
added to the future-incompat lints in 1.68.
2023-12-05 11:35:09 +01:00
Lukas Wirth
18f1a3c3c6
Some final touches
2023-12-03 20:20:59 +01:00
Lukas Wirth
d2a31acda1
Fix macro expansion expression parenthesis wrapping
2023-12-02 13:03:46 +01:00
Lukas Wirth
efa67294ed
Fix eager macro input spans being discarded
2023-12-01 16:29:58 +01:00
Lukas Wirth
0003e568ca
Pass calling span through to builtin macro expansions
2023-12-01 14:11:57 +01:00
Lukas Wirth
f48fa0c6cb
Re-implement syntax fixups
2023-11-29 16:00:39 +01:00
Lukas Wirth
b98597f06d
Re-enable proc-macros
2023-11-28 16:28:56 +01:00
Lukas Wirth
98cfdde8ba
Thinner TokenMap
2023-11-28 10:56:25 +01:00
Lukas Wirth
92d447f976
🧹
2023-11-28 10:55:40 +01:00
Lukas Wirth
6208960c48
Deduplicate dummy test span maps
2023-11-28 10:55:40 +01:00
Lukas Wirth
30093a6d81
spans always come from real file
2023-11-28 10:55:39 +01:00
Lukas Wirth
394d11b0fa
Fix float-split hack not setting up spans correctly
2023-11-28 10:55:39 +01:00
Lukas Wirth
05f375eae2
hygiene 2.0
2023-11-28 10:55:39 +01:00
Lukas Wirth
e36b3f7b8c
Proper span representation with syntax context
2023-11-28 10:55:39 +01:00
Lukas Wirth
890eb17b4e
Replace ID based TokenMap with proper relative text-ranges / spans
2023-11-28 10:55:39 +01:00
Lukas Wirth
83f91f61b1
Infect mbe crate with generic span type parameter
2023-11-28 10:55:39 +01:00
bors
16ac6c284c
Auto merge of #15756 - harpsword:fix_typo_in_mbe_lib, r=lnicola
...
fix typo in mbe/lib.rs comment
fix typo in mbe/lib.rs comment
2023-10-14 06:23:12 +00:00
harpsword
3f4368a090
fix: fix typo in mbe/lib.rs comment
2023-10-14 14:13:24 +08:00
cui fliter
58239f2990
Remove repetitive words
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-10-05 19:40:41 +08:00
Lukas Wirth
cba39f8553
fix: Fix float parser hack creating empty NameRef tokens
2023-08-08 14:44:33 +02:00
Lukas Wirth
75607fc34c
Simplify
2023-08-01 17:47:52 +02:00
bors
151c750dac
Auto merge of #15367 - Veykril:eager-macro-inputs, r=Veykril
...
fix: Strip unused token ids from eager macro input token maps
2023-08-01 11:23:02 +00:00
Lukas Wirth
c7b34e4873
fix: Strip unused token ids from eager macro input token maps
2023-07-31 17:12:17 +02:00
Ryo Yoshida
fd7435d463
Fixup path fragments upon MBE transcription
2023-07-30 23:36:42 +09:00