Add num_traits proc_macro helper for explicit import#35
Conversation
1142f8d to
6cec260
Compare
num_traits proc_macro helper for explicit importnum_traits proc_macro helper for explicit import
8b1b65c to
5283f57
Compare
cuviper
left a comment
There was a problem hiding this comment.
This looks nice, thank you.
One request though -- I think we need a test where num-traits is really not a direct dependency. The panini test is a start, but the real num-traits will still be in the crate prelude, so we don't really know that it did the right thing. Maybe you could add another test crate like the check/ path (used for no-std), and in this case depend on the num crate with #[num_traits = "num"].
|
Also I was wondering about the format of the helper attribute. We could also use an helper a la serde: |
5283f57 to
114944a
Compare
The `num-derive` requires `num-traits` to be explicitly included in Cargo.toml. (cf. rust-num/num-derive#34) This issue may be fixed in rust-num/num-derive#35.
This allows the user to specify a identifier for the `num_traits` crate so that the proc_macro can directly depend in it. This is usefull when reexporting `num-derive` and using `num-trait` as a transitive import. Fixes rust-num#34.
|
Hi, sorry I forgot to finish review on this. I went ahead and tinkered with it myself a bit more, and I think this is good to go. Thanks again! bors r+ |
|
Build succeeded: |
This allows the user to specify a identifier for the
num_traitscrateso that the proc_macros can directly depend in it.
This is usefull when reexporting
num-deriveand usingnum-traitasa transitive import.
Fixes #34.
CC. @vglavnyy