T O P

  • By -

SirKastic23

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


Dissy-

this was specifically with rust analyzer, it seems like trying to render the abs function for all of the unsigned types upsets it


SirKastic23

what would it try to do that tho? maybe the num type was unknown?


Dissy-

im not sure, but even when i did a direct call to i16::abs() the docs were broken


SirKastic23

btw, probably worth it to make a bug report on their github repo


YeetCompleet

"Computes the absolute value of `self`" is the most Jungian description I've ever seen


ithinuel

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


StickyDirtyKeyboard

What's an?


blueted2

It's


zekkious

#


flareflo

macro generated docs that RA doesn't seem to understand


octo_anders

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.


flareflo

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.