diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-20 07:15:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-20 07:15:12 +0800 |
| commit | f32f810e6ecde94e60baf0f11a38dc12ebee7453 (patch) | |
| tree | 20ce59a381ed4222c11ffcdb5bc611e10306a856 /src/rustllvm/PassWrapper.cpp | |
| parent | a04b88d1941644df01fa5e31dd43e0f57c13d938 (diff) | |
| parent | 13d94d666e037162808174f0bedbd5db9d65c7fe (diff) | |
| download | rust-f32f810e6ecde94e60baf0f11a38dc12ebee7453.tar.gz rust-f32f810e6ecde94e60baf0f11a38dc12ebee7453.zip | |
Rollup merge of #46518 - partim:asref-borrow-doc, r=dtolnay
Improve documentation for Borrow This is the first step in improving the documentation for all the reference conversion traits. It proposes new text for the trait documentation of `Borrow`. Since I feel it is a somewhat radical rewrite and includes a stricter contract for `Borrow` then the previous text—namely that *all* shared traits need to behave the same, not just a select few—, I wanted to get some feedback before continuing. Apart from the ‘normative’ description, the new text also includes a fairly extensive explanation of how the trait is used in the examples section. I included it because every time I look at how `HashMap` uses the trait, I need to think for a while as the use is a bit twisted. So, I thought having this thinking written down as part of the trait itself might be useful. One could argue that this should go into The Book, and, while I really like having everything important in the docs, I can see the text moved there, too. So, before I move on: is this new text any good? Do we feel it is correct, useful, comprehensive, and understandable? (This PR is in response to #44868 and #24140.)
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
