bors
d4689f183a
Auto merge of #18151 - ChayimFriedman2:metavar-concat, r=Veykril
...
feat: Support the `${concat(...)}` metavariable expression
I didn't follow rustc precisely, because I think it does some things wrongly (or they are FIXME), but I only allowed more code, not less. So we're all fine.
Closes #18145 .
2024-09-20 07:23:43 +00:00
Chayim Refael Friedman
5c06f047b9
When checking for forbidden expr kind matches, account for rawness
...
An expression starting with `r#const` etc. should be accepted even in edition <=2021.
2024-09-19 23:38:48 +03:00
Chayim Refael Friedman
8a50aecb07
Support the ${concat(...)}
metavariable expression
...
I didn't follow rustc precisely, because I think it does some things wrongly (or they are FIXME), but I only allowed more code, not less. So we're all fine.
2024-09-19 22:19:12 +03:00
bors
990c48cb0d
Auto merge of #18131 - ChayimFriedman2:macro-expand-dollar-crate, r=Veykril
...
fix: Get rid of `$crate` in expansions shown to the user
Be it "Expand Macro Recursively", "Inline macro" or few other things.
We replace it with the crate name, as should've always been.
Probably fixes some issues, but I don't know what they are.
2024-09-18 20:17:21 +00:00
Chayim Refael Friedman
cfb701ac78
Get rid of $crate
in expansions shown to the user
...
Be it "Expand Macro Recursively", "Inline macro" or few other things.
We replace it with the crate name, as should've always been.
2024-09-18 18:30:59 +03:00
Shoyu Vanilla
d34a663c70
feat: Implement expr_2021
2024-09-18 15:58:03 +09:00
Lukas Wirth
4502a602a7
internal: Lay basic ground work for standalone mbe tests
2024-09-01 12:42:44 +02:00
Vincent Esche
7dec7e92ea
Replace [package.repository] = "…"
of published crates with [package.repository.workspace] = true
2024-08-06 00:26:42 +02:00
Vincent Esche
6f329e6d5b
Add repository URL for published crates' missing [package.repository]
fields
2024-08-06 00:25:02 +02:00
Vincent Esche
b5b0f4bc5a
Replace "TBD"
with more helpful desciptions in published crates' [package.description]
fields
2024-08-06 00:25:02 +02:00
Lukas Wirth
d2dd4f6d5f
Split out syntax-bridge into a separate crate
2024-08-05 13:45:00 +02:00
Lukas Wirth
ae9c553902
Make basic use of spans for macro expansion errors
2024-07-29 14:52:40 +02:00
Lukas Wirth
f4199f786e
Parse contextual dyn keyword properly in edition 2015
2024-07-19 20:20:30 +02:00
Lukas Wirth
546eb6b530
Test macros doing edition dependent parsing
2024-07-19 16:43:58 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Lukas Wirth
7011094685
Add always disabled gen parse support
2024-07-17 10:49:12 +02:00
Lukas Wirth
93024ad411
Switch token trees to use Symbols
2024-07-16 10:11:59 +02:00
Lukas Wirth
05ce57efd5
Fix incorrect encoding of literals in the proc-macro-api on version 4
2024-07-15 14:51:01 +02:00
Lukas Wirth
e846c04fbe
Encode ident rawness and literal kind separately in tt::Leaf
2024-07-15 12:24:40 +02:00
Lukas Wirth
013b6a883f
Fix up the syntax tree for macro 2.0
2024-07-03 10:41:19 +02:00
Lukas Wirth
21a3d01875
Remove inline rust_2018_idioms, unused_lifetimes
lint warn, Cargo.toml already enforces this
2024-06-30 15:23:54 +02:00
Lukas Wirth
dc39e87b79
move tt-iter into tt crate
2024-06-24 14:47:21 +02:00
Lukas Wirth
8df034d453
Shrink mbe's Op
2024-06-24 10:07:32 +02:00
bors
b5e0d7c349
Auto merge of #17398 - Veykril:bogus-file, r=Veykril
...
internal: Remove FileId::BOGUS
2024-06-12 07:19:31 +00:00
Lukas Wirth
8ebabce475
internal: Remove FileId::BOGUS
2024-06-12 08:16:07 +02:00
bors
0a16ae340b
Auto merge of #17392 - randomicon00:17242, r=Veykril
...
Change 'Length' to 'Len'
This is a fix for #17242
2024-06-11 13:14:56 +00:00
randomicon00
bcf4221ab3
edit: Length to Len in benchmark
2024-06-11 09:09:56 -04:00
randomicon00
df63300092
edit: change 'Length' to 'Len'
2024-06-11 08:49:30 -04:00
Lukas Wirth
6f0207d594
Cleanup some inert attribute stuff
2024-06-04 12:38:20 +02:00
Lukas Wirth
36c1c77cf9
fix: Fix doc comment desugaring for proc-macros
2024-04-27 13:30:51 +02:00
Lukas Wirth
4135696ea7
Cleanup
2024-04-18 11:00:22 +02:00
Lukas Wirth
6bfdd38c69
Render matched macro arm on hover of macro calls
2024-04-18 10:51:58 +02:00
Lukas Wirth
a483d3bc37
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros
2024-04-14 16:02:38 +02:00
Lukas Wirth
83370fe5d7
Use Edition::CURRENT
2024-04-14 15:30:29 +02:00
Johann Hemmann
2cf5d8811a
Raise edition one more level
2024-04-14 15:11:33 +02:00
Johann Hemmann
454e481422
Add edition to all parse
functions of the parser crate
2024-04-14 15:07:43 +02:00
Lukas Wirth
cd8eb0fe6d
internal: Remove span trait
2024-03-21 20:08:30 +01:00
Lukas Wirth
6d1071962f
Resolve whether $pat is $pat_param or not via 🌟 hygiene 🌟
2024-03-21 10:22:45 +01:00
Lukas Wirth
7e88fa5d3a
Remove span generics from most of the mbe crate
2024-03-21 10:21:44 +01:00
Lukas Wirth
0dd89d7ee7
Remove usages of SpanData where Span suffices
2024-03-15 13:02:40 +01:00
bors
a2e274142f
Auto merge of #16819 - Veykril:span-upmapping, r=Veykril
...
internal: Improve rooted upmapping
cc https://github.com/rust-lang/rust-analyzer/issues/16235
2024-03-12 12:58:52 +00:00
Lukas Wirth
9ba4493918
internal: Improve rooted upmapping
2024-03-12 13:46:58 +01:00
Wyatt Herkamp
948a2dee09
Clippy Fix
2024-03-09 14:12:27 -05:00
Wyatt Herkamp
79f2651262
Add cfg_attr and cleanup code
2024-03-09 13:25:56 -05:00
Wyatt Herkamp
f45b080965
Starting Fix for cfg stripping
2024-03-08 11:10:29 -05:00
Lukas Wirth
c990587593
fix: Fix macro transcriber emitting incorrect lifetime tokens
2024-02-11 12:10:38 +01:00
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