warning: calling `foo8` can unsafe --> $DIR/dont_panic_2.rs:76:5 | 76 | x.push(""); | ^^^^^^^^^^ this can unsafe | note: `std::vec::Vec::<&str>::push` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:1880:13 | 1876 | pub fn push(&mut self, value: T) { | -------------------------------- ... 1880 | self.buf.reserve_for_push(self.len); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `alloc::raw_vec::RawVec::<&str>::reserve_for_push` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:302:24 | 301 | pub fn reserve_for_push(&mut self, len: usize) { | ---------------------------------------------- 302 | handle_reserve(self.grow_amortized(len, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `alloc::raw_vec::RawVec::<&str>::grow_amortized` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:404:19 | 383 | fn grow_amortized(&mut self, len: usize, additional: usize) -> Result<(), TryReserveError> { | ------------------------------------------------------------------------------------------ ... 404 | let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `alloc::raw_vec::finish_grow::` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:482:13 | 464 | / fn finish_grow( 465 | | new_layout: Result, 466 | | current_memory: Option<(NonNull, Layout)>, 467 | | alloc: &mut A, 468 | | ) -> Result, TryReserveError> 469 | | where 470 | | A: Allocator, | |_________________- ... 482 | alloc.grow(ptr, old_layout, new_layout) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 485 | alloc.allocate(new_layout) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(redpen::call_unsafe)]` on by default warning: calling `foo8` can unsafe --> $DIR/dont_panic_2.rs:79:1 | 79 | } | ^ this can unsafe | note: `std::ptr::drop_in_place::>` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:497:1 | 497 | pub unsafe fn drop_in_place(to_drop: *mut T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: 2 warnings emitted