rust-si icon indicating copy to clipboard operation
rust-si copied to clipboard

Hide implementation details from try_scan!

Open kangalio opened this issue 4 years ago • 1 comments

The following two macro variants seem to be more of an implementation detail than a part of the public API

(@question_mark: $($e:tt)+) => { ... };
(@unwrap: $($e:tt)+) => { ... };

When I first encountered it, I puzzled over them a good while to figure out what library users where supposed to achieve with this. Only after a while did I realize that this was an implementation detail for the bottom-most macro rule.

To avoid this confusion and clear up the docs, these two macro rules could be moved into a separate, private macro

kangalio avatar Jul 25 '20 07:07 kangalio

Makes sense. Maybe we can also do something like #[doc(hidden)] or what that flag is? Not sure if that works on macro arms.

oli-obk avatar Jul 25 '20 14:07 oli-obk