Lukas Wirth
df725d6b6d
fix: Do not create fn macro calls with non-fn expanders
2023-07-30 12:18:19 +02:00
Lukas Wirth
3db437cbd6
fix: Fix bad unwrap in eager_macro_recur
2023-07-30 11:41:21 +02:00
bors
8e5f944317
Auto merge of #15282 - HKalbasi:mir, r=HKalbasi
...
Give real discriminant_type to chalk
2023-07-14 16:46:35 +00:00
hkalbasi
50559118fb
Give real discriminant_type to chalk
2023-07-14 20:15:18 +03:30
Lukas Wirth
6a7b905c86
Fix the eager token maps by re-mapping the textranges between the input and input expansion
2023-07-13 09:22:38 +02:00
Lukas Wirth
2366c16bf9
Fix eager token mapping panics
2023-07-11 13:54:28 +02:00
Lukas Wirth
f6c09099da
Don't unnecessarily clone the input tt for decl macros
2023-07-10 16:28:23 +02:00
Lukas Wirth
d5f64f875a
Infallibe ExpandDatabase::macro_def
2023-07-10 16:23:29 +02:00
Lukas Wirth
4ff93398fd
Skip buildin subtrees for builtin derives
2023-07-10 15:19:00 +02:00
hkalbasi
3a1054fc1c
Replace x
with it
2023-07-06 17:33:17 +03:30
bors
4125fea0a7
Auto merge of #15222 - HKalbasi:mir, r=HKalbasi
...
Fix size_of_val and support min_align_of_val
2023-07-06 12:40:21 +00:00
hkalbasi
171ae2ee5d
Fix size_of_val and support min_align_of_val
2023-07-06 15:41:52 +03:30
Ryo Yoshida
827a0530bc
Don't show unresolved-field
diagnostic for missing names
2023-07-06 20:39:48 +09:00
Lukas Wirth
8886d707b8
Stronger typing for AstId and AstIdMap
2023-07-04 09:16:15 +02:00
Lukas Wirth
69cd3c30ac
Format let-else
2023-07-03 20:34:09 +02:00
Lukas Wirth
bdc3d0f551
Shuffle some proc_macro_expand query things around
2023-07-03 15:05:25 +02:00
Lukas Wirth
321e570d92
Don't diagnose builtin derives
2023-07-03 14:23:36 +02:00
bors
76bcd9946a
Auto merge of #15169 - lowr:patch/impl-header-anon-lifetime, r=HKalbasi
...
Use anonymous lifetime where possible
Because anonymous lifetimes are *super* cool.
More seriously, I believe anonymous lifetimes, especially those in impl headers, reduce cognitive load to a certain extent because they usually signify that they are not relevant in the signature of the methods within (or that we can apply the usual lifetime elision rules even if they are relevant).
2023-06-30 16:57:20 +00:00
hkalbasi
f53f9230f0
Support #[derive_const(Trait)]
2023-06-29 20:58:35 +03:30
Ryo Yoshida
4e793e7859
Use anonymous lifetime where possible
2023-06-29 23:27:28 +09:00
Lukas Wirth
8823db6c78
Bump more deps
2023-06-22 11:44:10 +02:00
David Lattimore
bea3a33d84
Change in-tree libs to workspace dependencies
2023-06-20 13:53:39 +10:00
hkalbasi
3c87825074
Use ArgumentV1
instead of Argument
2023-06-19 22:48:49 +03:30
bors
9c967d3809
Auto merge of #15053 - Veykril:crate-root-module-id, r=Veykril
...
internal: Add a CrateRootModuleId that encodes a module id that is always a crate root
2023-06-14 14:41:06 +00:00
Lukas Wirth
cf178cba8f
internal: Add a CrateRootModuleId that encodes a module id that is always a crate root
2023-06-14 15:41:06 +02:00
bors
07bc6cbcad
Auto merge of #15040 - lnicola:hash-state-name, r=Veykril
...
fix: Use a more obscure hasher name in derive expansion
Closes #15039
2023-06-13 06:13:35 +00:00
Laurențiu Nicola
0b441ca6a5
Use a more obscure hasher name in derive expansion
2023-06-13 08:50:27 +03:00
hkalbasi
f8594f78bb
Use ConstArg
instead of Expr
for AstId
of InTypeConstId
2023-06-11 00:39:28 +03:30
hkalbasi
a481e004b0
Lower const params with a bad id
2023-06-11 00:39:28 +03:30
Lukas Wirth
b6fb35f20c
Shrink hir_expand::attr::AttrInput by boxing a variant
2023-06-10 01:21:52 +02:00
Lukas Wirth
a02b9b279e
internal: Lazy eager macros
2023-06-09 13:02:13 +02:00
hkalbasi
30e16e20d0
Fix unwrap on None in expanding format args
2023-06-08 00:17:22 +03:30
Ryo Yoshida
4f0c6fac17
fix: only generate trait bound for associated types in field types
2023-06-07 20:52:49 +09:00
Laurențiu Nicola
c3dbe7c717
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2023-06-05 11:07:47 +03:00
Lukas Wirth
bbd9e41606
Don't add --all-targets to runnables for no-std crates
2023-05-28 14:18:44 +02:00
hkalbasi
b0f17668f7
use ::core
instead of $crate
in option_env!
2023-05-25 18:46:34 +03:30
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
bors
2f840c2236
Auto merge of #14874 - Veykril:crate-cfg, r=Veykril
...
expand: Change how `#![cfg(FALSE)]` behaves on crate root
Closes https://github.com/rust-lang/rust-analyzer/issues/14769
2023-05-24 16:06:09 +00:00
Lukas Wirth
74d6826858
expand: Change how #![cfg(FALSE)]
behaves on crate root
2023-05-24 13:02:38 +02:00
Lukas Wirth
14dc1ac3bf
internal: Shrink ProcMacroExpander from 8 to 4 bytes
2023-05-20 11:31:28 +02:00
hkalbasi
4adfbbfbad
partially support panic message in MirEvalError
2023-05-18 18:30:49 +03:30
bors
034d7c8537
Auto merge of #14787 - HKalbasi:mir2, r=HKalbasi
...
MIR episode 5
This PR inits drop support (it is very broken at this stage, some things are dropped multiple time, drop scopes are wrong, ...) and adds stdout support (`println!` doesn't work since its expansion is dummy, but `stdout().write(b"hello world\n")` works if you use `RA_SYSROOT_HACK`) for interpreting. There is no useful unit test that it can interpret yet, but it is a good sign that it didn't hit a major road block yet.
In MIR lowering, it adds support for slice pattern and anonymous const blocks, and some fixes so that we can evaluate `SmolStr::new_inline` in const eval. With these changes, 57 failed mir body remains.
2023-05-18 09:44:26 +00:00
bors
f9be79603a
Auto merge of #14820 - HKalbasi:format-args, r=HKalbasi
...
Expand `format_args!` with more details
2023-05-18 09:09:06 +00:00
hkalbasi
5c83e222a3
fix format_args
expansion error with raw strings
2023-05-18 12:32:41 +03:30
Lukas Wirth
d6dcfa5744
internal: Less file parsing for symbol index generation
2023-05-18 08:25:06 +02:00
hkalbasi
a6e5a912f9
Expand format_args!
with more details
2023-05-16 19:12:40 +03:30
hkalbasi
cbcafd3539
MIR episode 5
2023-05-12 18:17:15 +03:30
hkalbasi
7da80d4f67
Use double reference in debug derive
2023-05-12 12:36:57 +03:30
Ryo Yoshida
34a9129333
fix: column!()
and line!()
built-in macros return u32
2023-05-11 21:13:05 +09:00
hkalbasi
d9f4cbbe8f
Emit function bodies in expanding builtin derives
2023-05-03 14:14:47 +03:30