diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-12 18:04:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-12 18:04:10 +0100 |
| commit | 83056861260a10c9a5019f4da9646950475dea90 (patch) | |
| tree | 6ac5afabddfebeb6c70b2d0cad523a40fb0de264 /compiler/rustc_pattern_analysis/src | |
| parent | 3f67169a5fa1996d121de2464e04096f4c305c85 (diff) | |
| parent | f34d9da7db8447e5616f964bfa65b09a7b45ba3a (diff) | |
| download | rust-83056861260a10c9a5019f4da9646950475dea90.tar.gz rust-83056861260a10c9a5019f4da9646950475dea90.zip | |
Rollup merge of #120936 - ripytide:master, r=Amanieu
improve `btree_cursors` functions documentation
As suggested by ``@Amanieu`` (and others) in #107540 (https://github.com/rust-lang/rust/issues/107540#issuecomment-1937760547)
Improvements:
- Document exact behavior of `{upper/lower}_bound{,_mut}` with each of the three `Bound` types using unambigous words `{greatest,greater,smallest,smaller,before,after}`.
- Added another doc-example for the `Bound::Unbounded` for each of the methods
- Changed doc-example to use From<[T; N]> rather than lots of `insert()`s which requires a mutable map which clutters the example when `mut` may not be required for the method (such as for `{upper,lower}_bound`.
- Removed `# Panics` section from `insert_{before,after}` methods since they were changed to return an error instead a while ago.
- Reworded some phrases to be more consistent with the more regular `BTreeMap` methods such as calling entries "key-value" rather than "element"s.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
