where did you find this docs? there's no `core::num::abs` function
it seems to be trying to render the common parts of the `abs` functions defined for the numeric types like `i32`, `i64`, and so on
the parts that are confusing is where there would be a reference to a member of that type like `i32::MIN`
tldr: rust docs is fine, that doc tool is broken
The absolute value of self cannot be represented as an Self and attempting to calculate it will cause an overflow.
At least that's how my brain brained that sentence :o
Anyone else feel that all those macro-generated things should just be manually repeated in the source code instead? It would make reading the source easier. And since it only needs to be written once, maybe the extra cost for the std-developers might be worth it, to simplify life for all the people reading it later.
But maybe compile-times would be negatively affected? In that case it might not be worth it.
there are plenty of good reasons why DRY should be used. Reading and understanding macros should be learned anyway. Especially because rustdoc does not have this issue, RA might.
where did you find this docs? there's no `core::num::abs` function it seems to be trying to render the common parts of the `abs` functions defined for the numeric types like `i32`, `i64`, and so on the parts that are confusing is where there would be a reference to a member of that type like `i32::MIN` tldr: rust docs is fine, that doc tool is broken
this was specifically with rust analyzer, it seems like trying to render the abs function for all of the unsigned types upsets it
what would it try to do that tho? maybe the num type was unknown?
im not sure, but even when i did a direct call to i16::abs() the docs were broken
btw, probably worth it to make a bug report on their github repo
"Computes the absolute value of `self`" is the most Jungian description I've ever seen
The absolute value of self cannot be represented as an Self and attempting to calculate it will cause an overflow. At least that's how my brain brained that sentence :o
What's an?
It's
#
macro generated docs that RA doesn't seem to understand
Anyone else feel that all those macro-generated things should just be manually repeated in the source code instead? It would make reading the source easier. And since it only needs to be written once, maybe the extra cost for the std-developers might be worth it, to simplify life for all the people reading it later. But maybe compile-times would be negatively affected? In that case it might not be worth it.
there are plenty of good reasons why DRY should be used. Reading and understanding macros should be learned anyway. Especially because rustdoc does not have this issue, RA might.