-
Notifications
You must be signed in to change notification settings - Fork 0
Add relative-path macros #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Requires Rust version 1.88.0 or newer.
|
I defined a |
|
Might be worth implementing a polyfill strategy like |
|
@LarryOsterman what do you think about having macros that support relative paths (to the source file that includes the macro) for Rust version >= 1.88 when, to support 1.85 (our MSRV), I have to support |
I have mixed feelings - it seems like a nice addition, but it's weird that it requires a separate macro - IMHO that makes it less useful. And I suspect that the base functionality is probably sufficient for now. |
|
Maybe I could support both ways. If I set the floor (practically a
Or maybe that's just too magical. |
Actually, except for the 1.88 thingy, this seems to be pretty close to exactly what I'd want :) And the 1.88 thing could be manageable. The only real challenge there ensuring that we don't do rustdoc tests on the MSRV pipeline until we update MSRV to be 1.88 or beyond. |
That shouldn't matter, though. If we use crate root-relative paths - no preceding "." - it'll work regardless of the rustc version. If/when we update to >= 1.88 and it seems easier to manage to make them relative to the source file like |
|
@LarryOsterman @RickWinter @analogrelay I have another idea: named parameters with or without values just like serde et. al. I could add |
|
Replaced by PR #29 |
Requires Rust version 1.88.0 or newer.