diff options
| author | bors <bors@rust-lang.org> | 2018-01-30 11:10:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-30 11:10:06 +0000 |
| commit | def3269a71be2e737cad27418a3dad9f5bd6cd32 (patch) | |
| tree | 1b6a3bf9de28edffa1c9ac671aa066d1c079e35d /src/liballoc | |
| parent | fe7e1a45f37f4265434cead827f587e75412f85c (diff) | |
| parent | 393a1994af93977fe1e35fb4ec308bc4e5d1a6dd (diff) | |
| download | rust-def3269a71be2e737cad27418a3dad9f5bd6cd32.tar.gz rust-def3269a71be2e737cad27418a3dad9f5bd6cd32.zip | |
Auto merge of #47870 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests - Successful merges: #47515, #47603, #47718, #47732, #47760, #47780, #47822, #47826, #47836, #47839, #47853, #47855 - Failed merges:
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/btree/map.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/liballoc/btree/map.rs b/src/liballoc/btree/map.rs index b114dc640fb..b320bed5432 100644 --- a/src/liballoc/btree/map.rs +++ b/src/liballoc/btree/map.rs @@ -1748,6 +1748,11 @@ impl<'a, K: Ord, Q: ?Sized, V> Index<&'a Q> for BTreeMap<K, V> { type Output = V; + /// Returns a reference to the value corresponding to the supplied key. + /// + /// # Panics + /// + /// Panics if the key is not present in the `BTreeMap`. #[inline] fn index(&self, key: &Q) -> &V { self.get(key).expect("no entry found for key") |
