Describe doc attribute in the reference

FIxes #7963.
auto merge of #18376 : steveklabnik/rust/gh7963, r=alexcrichton

FIxes #7963.