mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 15:50:05 +03:00
Track caller of Vec::remove()
This commit is contained in:
@@ -1372,9 +1372,11 @@ fn assert_failed(index: usize, len: usize) -> ! {
|
||||
/// assert_eq!(v, [1, 3]);
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[track_caller]
|
||||
pub fn remove(&mut self, index: usize) -> T {
|
||||
#[cold]
|
||||
#[inline(never)]
|
||||
#[track_caller]
|
||||
fn assert_failed(index: usize, len: usize) -> ! {
|
||||
panic!("removal index (is {}) should be < len (is {})", index, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user