[WIP]: Add overload proc macro for #[splat] function overloading#5
[WIP]: Add overload proc macro for #[splat] function overloading#5Ajay-singh1 wants to merge 5 commits into
#[splat] function overloading#5Conversation
Signed-off-by: Ajay Singh <ajaykripa8736968359@gmail.com>
teor2345
left a comment
There was a problem hiding this comment.
Looks like you need to edit the Cargo.toml files to fix these CI errors, do you want some help with that?
error: the
#[proc_macro]attribute is only usable with crates of theproc-macrocrate type
[lib]
proc-macro = truehttps://doc.rust-lang.org/reference/procedural-macros.html#r-macro.proc.def
error[E0432]: unresolved import
proc_macro
error[E0433]: cannot find module or cratesynin this scope
error[E0432]: unresolved importquote
The dependency versions are in the base Cargo.toml, then they can get inherited by this crate's Cargo.toml.
|
I'll fix it thanks!
…On Mon, 13 Jul, 2026, 9:12 am teor, ***@***.***> wrote:
***@***.**** commented on this pull request.
Looks like you need to edit the Cargo.toml files to fix these CI errors,
do you want some help with that?
error: the #[proc_macro] attribute is only usable with crates of the
proc-macro crate type
[lib]proc-macro = true
https://doc.rust-lang.org/reference/procedural-macros.html#r-macro.proc.def
error[E0432]: unresolved import proc_macro
error[E0433]: cannot find module or crate syn in this scope
error[E0432]: unresolved import quote
The dependency versions are in the base Cargo.toml
<https://github.com/rustfoundation/overloading-macros/blob/d4e14c09ce980ee6946c47429ae3a94d93096198/Cargo.toml#L28>,
then they can get inherited by this crate's Cargo.toml
<https://github.com/rustfoundation/overloading-macros/blob/d4e14c09ce980ee6946c47429ae3a94d93096198/splat-overload/Cargo.toml#L15>
.
—
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AI7B2GH4CVFQZWZHJA2CUED5ERLCLA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINRYGE3DANBTHE4KM4TFMFZW63VGMFZXG2LHN2SWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-4681604398>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7B2GDSECVSXZQNNTZIPLD5ERLCLAVCNFSNUABGKJSXA33TNF2G64TZHMYTEOJRGQ2TIMBUGM5US43TOVSTWNBYGY4DANBXGU4DNILWAI>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Signed-off-by: Ajay Singh <ajaykripa8736968359@gmail.com>
Signed-off-by: Ajay Singh <ajaykripa8736968359@gmail.com>
Signed-off-by: Ajay Singh <ajaykripa8736968359@gmail.com>
teor2345
left a comment
There was a problem hiding this comment.
Let's fix and merge what we have now, then open other PRs for further changes?
| @@ -0,0 +1,2 @@ | |||
| [toolchain] | |||
There was a problem hiding this comment.
Good idea, I should do this in the blog post examples as well
| #![feature(tuple_trait)] | ||
| #![allow(incomplete_features)] | ||
|
|
||
| use splat_overload::overload; |
There was a problem hiding this comment.
Looks like there's trailing whitespace on a bunch of these lines, running cargo fmt --all should get rid of them and pass CI.
This is a proof of concept for the
overload!macro that makes#[splat]easier to use for function overloading.
What it does
Turns this:
Into this (generated automatically):
Current limitations
Next steps