Closed
Description
Example: The macro env
is documented as
macro_rules! env {
($name:expr) => { ... };
}
when in reality, the following call is legal (playground):
let e = env!("PATH",); // <- Note: Trailing comma
I believe this is because the definition in std is just a fake stub. concat!
and concat_idents!
(edit: also format_args!
) are in a similar boat (they also support trailing commas in places where the documented pattern suggests they would not).
In all fairness this is not a big deal, and even has the conceivable benefit that the documentation is cleaner without such laser precision. I just thought it was worth making an issue for.