rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
731 stars 135 forks source link

Add `--generate-link-to-definition` option when building on docs.rs #277

Closed GuillaumeGomez closed 1 year ago

GuillaumeGomez commented 1 year ago

This option generates links in source code pages, allowing to jump to definition and to jump back to doc. It makes browsing the source code pages much nicer. You can see it in action here.

cuviper commented 1 year ago

Are other crates adopting it in this way yet?

Doesn't this also require -Z unstable-options?

GuillaumeGomez commented 1 year ago

docs.rs uses only nightly and already uses -Z unstable-options. dtolnay crates are using it, some from burnsushi, and a few more as well. There are two goals for me: gather some documentation readers feedback and get some maintainers feedback as well.

And as a side-goal: having better docs to browse when reading source code pages. :)

cuviper commented 1 year ago

OK, thanks!

bors r+

bors[bot] commented 1 year ago

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.