about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-07-16 10:22:00 +0000
committerbors <bors@rust-lang.org>2017-07-16 10:22:00 +0000
commitbe18613281e590fdb16f40b10c871abfd4bc9653 (patch)
treee362ba3dd9226e00d6be0e4fede5490e564467d2 /src/rustllvm/RustWrapper.cpp
parent086eaa78ea70075abe4e6b7fb9dc76259867b4be (diff)
parentcaf125f414cc7bcdacdbfeab5c3b62eba772c8a3 (diff)
downloadrust-be18613281e590fdb16f40b10c871abfd4bc9653.tar.gz
rust-be18613281e590fdb16f40b10c871abfd4bc9653.zip
Auto merge of #43252 - vbrandl:doc/default-values, r=GuillaumeGomez
Document default values for primitive types

All primitive types implement the `Default` trait but the documentation just says `Returns the "default value" for a type.` and doesn't give a hint about the actual default value. I think it would be good to document the default values in a proper way.
I changed the `default_impl` macro to accept a doc string as a third parameter and use this string to overwrite the documentation of `default()` for each primitive type.
The generated documentation now looks like this:
![Documentation of default() on the bool primitive](https://i.imgur.com/nK6TApo.png)
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions