Lines Matching refs:panic
2051 panic!()
2298 panic!("should not happen");
2593 use std::panic::{catch_unwind, AssertUnwindSafe};
3138 panic!("panic in `drop`");
3185 drop(q.drain_filter(|item| if item.0 >= 2 { panic!() } else { true }))
3278 panic!("panic in `drop`");
3460 98 => panic!("I've almost got 99 problems."),
3466 panic!("I am unreachable.");
4206 // check the panic includes the prefix of the sliced string
4212 // check the truncation in the panic message
4441 panic!();
4628 panic!("character {:x}={} does not decode correctly", c as u32, c);
4640 panic!("character {:x}={} does not decode correctly", c as u32, c);
5209 _ => panic!("invalid `Cow::from`"),
5277 panic!("Input skipped range at {}", err);
5281 panic!("Did not cover whole input");
5621 use std::panic;
6029 let _ = panic::catch_unwind(panic::AssertUnwindSafe(|| {
6036 _ => panic!(),
6321 panic!("isize::MAX shouldn't trigger an overflow!");
6325 panic!("isize::MAX shouldn't trigger an overflow!");
6332 panic!("isize::MAX + 1 should trigger an overflow!")
6338 panic!("usize::MAX should trigger an overflow!")
6344 panic!("isize::MAX + 1 should trigger an OOM!")
6350 panic!("usize::MAX should trigger an OOM!")
6360 panic!("isize::MAX shouldn't trigger an overflow!");
6363 panic!("isize::MAX shouldn't trigger an overflow!");
6368 panic!("isize::MAX + 1 should trigger an overflow!");
6373 panic!("isize::MAX + 1 should trigger an OOM!")
6379 panic!("usize::MAX should trigger an overflow!")
6400 panic!("isize::MAX shouldn't trigger an overflow!");
6403 panic!("isize::MAX shouldn't trigger an overflow!");
6409 panic!("isize::MAX + 1 should trigger an overflow!")
6414 panic!("usize::MAX should trigger an overflow!")
6419 panic!("isize::MAX + 1 should trigger an OOM!")
6424 panic!("usize::MAX should trigger an OOM!")
6433 panic!("isize::MAX shouldn't trigger an overflow!");
6436 panic!("isize::MAX shouldn't trigger an overflow!");
6441 panic!("isize::MAX + 1 should trigger an overflow!");
6446 panic!("isize::MAX + 1 should trigger an OOM!")
6451 panic!("usize::MAX should trigger an overflow!")
6537 use std::panic::{catch_unwind, AssertUnwindSafe};
6829 _ => panic!(),
6844 _ => panic!(),
6859 panic!();
6871 3 => false, // Drop panic.
7048 panic!("BadElem panic: 0xbadbeef")
7297 panic!("panic in `drop`");
7489 panic!("panic in `drop`");
7564 let _ = std::panic::catch_unwind(AssertUnwindSafe(|| {
7569 std::panic!("aborting iteration");
7603 panic!();
7613 let _ = std::panic::catch_unwind(AssertUnwindSafe(|| {
7633 _ => panic!("invalid `Cow::from`"),
7863 let _ = std::panic::catch_unwind(move || {
7866 panic!("panic at index: {}", c.index);
7868 // Verify that if the filter could panic again on another element
7869 // that it would not cause a double panic and all elements of the
7872 panic!("panic at index: {}", c.index);
7915 let _ = std::panic::catch_unwind(move || {
7918 panic!("panic at index: {}", c.index);
7920 // Verify that if the filter could panic again on another element
7921 // that it would not cause a double panic and all elements of the
7924 panic!("panic at index: {}", c.index);
8000 panic!("isize::MAX shouldn't trigger an overflow!");
8004 panic!("isize::MAX shouldn't trigger an overflow!");
8011 panic!("isize::MAX + 1 should trigger an overflow!")
8017 panic!("usize::MAX should trigger an overflow!")
8023 panic!("isize::MAX + 1 should trigger an OOM!")
8029 panic!("usize::MAX should trigger an OOM!")
8039 panic!("isize::MAX shouldn't trigger an overflow!");
8042 panic!("isize::MAX shouldn't trigger an overflow!");
8047 panic!("isize::MAX + 1 should trigger an overflow!");
8052 panic!("isize::MAX + 1 should trigger an OOM!")
8058 panic!("usize::MAX should trigger an overflow!")
8067 panic!("isize::MAX shouldn't trigger an overflow!");
8070 panic!("isize::MAX shouldn't trigger an overflow!");
8075 panic!("isize::MAX + 1 should trigger an overflow!");
8080 panic!("isize::MAX + 1 should trigger an OOM!")
8086 panic!("usize::MAX should trigger an overflow!");
8107 panic!("isize::MAX shouldn't trigger an overflow!");
8110 panic!("isize::MAX shouldn't trigger an overflow!");
8116 panic!("isize::MAX + 1 should trigger an overflow!")
8121 panic!("usize::MAX should trigger an overflow!")
8126 panic!("isize::MAX + 1 should trigger an OOM!")
8131 panic!("usize::MAX should trigger an OOM!")
8140 panic!("isize::MAX shouldn't trigger an overflow!");
8143 panic!("isize::MAX shouldn't trigger an overflow!");
8148 panic!("isize::MAX + 1 should trigger an overflow!");
8153 panic!("isize::MAX + 1 should trigger an OOM!")
8158 panic!("usize::MAX should trigger an overflow!")
8166 panic!("isize::MAX shouldn't trigger an overflow!");
8169 panic!("isize::MAX shouldn't trigger an overflow!");
8174 panic!("isize::MAX + 1 should trigger an overflow!");
8179 panic!("isize::MAX + 1 should trigger an OOM!")
8184 panic!("usize::MAX should trigger an overflow!")
8247 v.resize_with(2, || panic!());
8616 panic!("extend_from_within must use specialization on copy");
8794 let _ = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
8801 panic!("expected: {:?}\ngot: {:?}\n", expected, vec);
8816 panic!("panic! at the clone");
8836 // This should clone&append one Panic{..} at the end, and then panic while
8841 std::panic::catch_unwind(move || vec.extend_from_within(..)).unwrap_err();
8930 panic!("Adding empty strings to a borrow should note allocate");
8933 panic!("Adding empty strings to a borrow should note allocate");
8936 panic!("Adding empty strings to a borrow should note allocate");
8939 panic!("Adding empty strings to a borrow should note allocate");
8956 panic!("Adding empty strings to a borrow should note allocate");
8959 panic!("Adding empty strings to a borrow should note allocate");
8962 panic!("Adding empty strings to a borrow should note allocate");
8980 panic!("Adding empty strings to a borrow should note allocate");
8986 panic!("Adding empty strings to a borrow should note allocate");
8992 panic!("Adding empty strings to a borrow should note allocate");
8998 panic!("Adding empty strings to a borrow should note allocate");
9020 panic!("Adding empty strings to a borrow should note allocate");
9026 panic!("Adding empty strings to a borrow should note allocate");
9032 panic!("Adding empty strings to a borrow should note allocate");
9213 98 => panic!("I've almost got 99 problems."),
9219 panic!("I am unreachable.");
9251 use std::panic;
9690 // This will reorder the elements *somehow*, but won't panic.
9701 // Should not panic.
10747 panic!()
10756 let panic = Canary { count: drop_count.clone(), panics: true };
10758 std::panic::catch_unwind(move || {
10761 vec![canary.clone(), canary.clone(), canary.clone(), panic, canary].into_boxed_slice();
10763 // When panic is cloned, +3.
10931 // ... and then panic on each and every single one.
10940 let _ = std::panic::catch_unwind(move || {
10946 panic!();
10971 let prev = panic::take_hook();
10972 panic::set_hook(Box::new(move |info| {
11017 // Set default panic hook again.
11018 drop(panic::take_hook());
11055 _ => panic!(),
11210 use std::panic::{catch_unwind, AssertUnwindSafe};
11944 panic!("panic in `drop`");
12379 panic!("isize::MAX shouldn't trigger an overflow!");
12383 panic!("isize::MAX shouldn't trigger an overflow!");
12390 panic!("isize::MAX + 1 should trigger an overflow!")
12396 panic!("usize::MAX should trigger an overflow!")
12405 panic!("isize::MAX + 1 should trigger an OOM!")
12415 panic!("isize::MAX shouldn't trigger an overflow!");
12418 panic!("isize::MAX shouldn't trigger an overflow!");
12423 panic!("isize::MAX + 1 should trigger an overflow!");
12428 panic!("isize::MAX + 1 should trigger an OOM!")
12434 panic!("usize::MAX should trigger an overflow!")
12443 panic!("isize::MAX shouldn't trigger an overflow!");
12446 panic!("isize::MAX shouldn't trigger an overflow!");
12451 panic!("isize::MAX + 1 should trigger an overflow!");
12456 panic!("isize::MAX + 1 should trigger an OOM!")
12462 panic!("usize::MAX should trigger an overflow!");
12483 panic!("isize::MAX shouldn't trigger an overflow!");
12486 panic!("isize::MAX shouldn't trigger an overflow!");
12492 panic!("isize::MAX + 1 should trigger an overflow!")
12497 panic!("usize::MAX should trigger an overflow!")
12506 panic!("isize::MAX + 1 should trigger an OOM!")
12515 panic!("isize::MAX shouldn't trigger an overflow!");
12518 panic!("isize::MAX shouldn't trigger an overflow!");
12523 panic!("isize::MAX + 1 should trigger an overflow!");
12528 panic!("isize::MAX + 1 should trigger an OOM!")
12533 panic!("usize::MAX should trigger an overflow!")
12541 panic!("isize::MAX shouldn't trigger an overflow!");
12544 panic!("isize::MAX shouldn't trigger an overflow!");
12549 panic!("isize::MAX + 1 should trigger an overflow!");
12554 panic!("isize::MAX + 1 should trigger an OOM!")
12559 panic!("usize::MAX should trigger an overflow!")
12808 panic!("panic in `drop`");
12842 panic!("panic in `drop`");
13286 use std::panic::{catch_unwind, AssertUnwindSafe};
13586 panic!("panic in `drop`");
13702 use std::panic::{self, AssertUnwindSafe};
13720 panic!("Panicking comparison");
13748 // push the panicking item to the heap and catch the panic
13751 panic::catch_unwind(move || {
14352 /// rather than directly invoking `panic!` or similar.
14386 panic!("memory allocation of {} bytes failed", size)
14688 /// itself to panic.
14968 panic!("capacity overflow");
15127 // if the `len` calculation overflows, we'll panic
15452 /// This function will panic if the capacity would overflow.
15462 /// A panic upon overflow:
15465 /// // this will panic at runtime
16006 panic!();
16015 // Should panic, but not cause memory corruption
16592 panic!("not available with cfg(test)");
17364 None => panic!("cannot remove a char from the end of a string"),
18736 // panic code being inserted again.
18977 /// _ => panic!("expect borrowed value"),
18988 /// _ => panic!("expect owned data"),
20805 // In the event of a panic, elements that have been written
21415 // The default implementation would collect into a vec which would panic.
21416 // Thus we panic here immediately without invoking `Vec` code.
21417 panic!("capacity overflow");
22475 /// This function will panic if the capacity would overflow.
22485 /// A panic upon overflow:
22488 /// // this will panic at runtime
24457 // In the event of a panic, elements that have been written
25756 // The default implementation would collect into a vec which would panic.
25757 // Thus we panic here immediately without invoking `Vec` code.
25758 panic!("capacity overflow");
26780 panic!();
26789 // Should panic, but not cause memory corruption
28785 (None, _) => panic!("prev link for head"),
28789 _ => panic!("prev link is none, not good"),
29293 /// Some instances may be configured to panic at some point.
29320 pub fn spawn(&self, panic: Panic) -> Instance<'_> {
29321 Instance { origin: self, panic }
29343 panic: Panic,
29362 if self.panic == Panic::InQuery {
29363 panic!("panic in `query`");
29372 if self.panic == Panic::InClone {
29373 panic!("panic in `clone`");
29375 Self { origin: self.origin, panic: Panic::Never }
29382 if self.panic == Panic::InDrop {
29383 panic!("panic in `drop`");
29623 panic!("range start and end are equal and excluded in BTreeMap")
29628 panic!("range start is greater than range end in BTreeMap")
29895 /// // Look up the value for a key (will panic if the key is not found).
30987 /// closure if a panic occurs in the closure, or a panic occurs while
31424 /// or if a panic occurred in the predicate.
32067 /// If a panic occurs in the `change` closure, the entire process will be aborted.
32077 /// If a panic occurs in the `change` closure, the entire process will be aborted.
33120 /// if a panic occurs in the closure, or if a panic occurs while dropping a value, or if the
34293 use std::panic::{catch_unwind, AssertUnwindSafe};
35415 /// // If now try to get the value, it will panic:
35536 /// // If we try to get "poneyland"'s value, it'll panic:
35574 use std::panic::{catch_unwind, AssertUnwindSafe};
36340 // we cause a different panic than `test_range_backwards_1` does.
36737 // Same as above, but attempt to use the iterator again after the panic in the predicate
36751 // Iterator behaviour after a panic is explicitly unspecified,
37364 Vacant(_) => panic!(),
37380 Occupied(_) => panic!(),
37669 let panic = if i == panic_point { Panic::InDrop } else { Panic::Never };
37670 (dummies[i].spawn(Panic::Never), dummies[i].spawn(panic))
42443 // This may panic or abort
42653 /// does _not_ panic and is a no-op rotation.
42696 /// does _not_ panic and is a no-op rotation.
43218 // the `Vec` so the items will drop on panic.
44794 // the hole is filled back at the end of its scope, even on panic.
46188 // panic anyway.
46189 panic!("capacity overflow");
46487 // Since the previous branch would eagerly panic if the capacity is too large
46489 _ => panic!("capacity overflow"),
46694 // a) no ZSTs as there would be no allocation to reuse and pointer arithmetic would panic
47014 /// your software will panic! You cannot do this:
47018 /// println!("{}", v[6]); // it will panic!
47715 // they are equal, so we can avoid the panic case in `RawVec::shrink_to_fit`
47834 // were to panic once (if it panics twice, the program aborts).
48076 panic!("swap_remove index (is {}) should be < len (is {})", index, len);
48115 panic!("insertion index (is {}) should be <= len (is {})", index, len);
48163 panic!("removal index (is {}) should be < len (is {})", index, len);
48418 * when `same_bucket` is guaranteed to not panic, this bloats a little
48441 // This will panic or abort if we would allocate > isize::MAX bytes
48648 panic!("`at` split index (is {}) should be <= len (is {})", at, len);
49772 /// A flag that indicates a panic has occurred in the filter test predicate.
49855 // drained item prior to a panic in the predicate.
51877 // (beyond detecting a panic).
51974 Err(..) => panic!(),
51980 Err(..) => panic!(),