| commit | 8e1e6ac25cf899cf7030f11b6096b991ad261381 | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Wed Aug 26 20:51:43 2020 -0700 |
| committer | David Tolnay <dtolnay@gmail.com> | Wed Aug 26 22:13:31 2020 -0700 |
| tree | 9d6ce256e4b0c82727f34c7dc017dc542efe954a | |
| parent | 61adf428be27bc20200c87a977692a39219f1b5f [diff] [blame] |
Extend exception message from Vec<T>::at
diff --git a/include/cxx.h b/include/cxx.h index d3f6238..90c0524 100644 --- a/include/cxx.h +++ b/include/cxx.h
@@ -481,8 +481,9 @@ template <typename T> const T &Vec<T>::at(size_t n) const { - if (n >= this->size()) - panic<std::out_of_range>("Vec"); + if (n >= this->size()) { + panic<std::out_of_range>("rust::Vec index out of range"); + } return (*this)[n]; }