warning: calling `main` can unsafe --> $DIR/disallow.rs:19:14 | 19 | let _ = &vec!(Pizza(&Pizza(Pineapple))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this can unsafe | note: `alloc::alloc::exchange_malloc` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:241:9 | 241 | self.alloc_impl(layout, false) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 328 | unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 { | --------------------------------------------------------------- note: `std::alloc::Global::alloc_impl` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:98:9 | 98 | __rust_alloc(layout.size(), layout.align()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 170 | unsafe { __rust_alloc_zeroed(layout.size(), layout.align()) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 176 | fn alloc_impl(&self, layout: Layout, zeroed: bool) -> Result, AllocError> { | --------------------------------------------------------------------------------------- = note: `#[warn(redpen::call_unsafe)]` on by default warning: calling `main` can unsafe --> $DIR/disallow.rs:20:14 | 20 | let _ = &vec!(Pizza(&Pizza(&Pineapple))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this can unsafe | note: `alloc::alloc::exchange_malloc` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:241:9 | 241 | self.alloc_impl(layout, false) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 328 | unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 { | --------------------------------------------------------------- note: `std::alloc::Global::alloc_impl` can unsafe here --> /home/gh-estebank/.rustup/toolchains/nightly-2024-05-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:98:9 | 98 | __rust_alloc(layout.size(), layout.align()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 170 | unsafe { __rust_alloc_zeroed(layout.size(), layout.align()) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 176 | fn alloc_impl(&self, layout: Layout, zeroed: bool) -> Result, AllocError> { | --------------------------------------------------------------------------------------- warning: calling `main` can unsafe --> $DIR/disallow.rs:21:1 | 21 | } | ^ 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) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type parameter `T` in `Pizza` can't be `Pineapple` --> $DIR/disallow.rs:8:20 | 8 | type Alias = Pizza; //~ ERROR | ^^^^^^^^^ | = note: `#[deny(redpen::disallow)]` on by default error: type parameter `T` in `Pizza` can't be `std::string::String` --> $DIR/disallow.rs:9:21 | 9 | type Alias2 = Pizza; //~ ERROR | ^^^^^^ error: type parameter `T` in `Pizza` can't be `Pineapple` --> $DIR/disallow.rs:11:17 | 11 | fn foo(p: Pizza) -> Pizza { | ^^^^^^^^^ error: type parameter `T` in `Pizza` can't be `Pineapple` --> $DIR/disallow.rs:11:38 | 11 | fn foo(p: Pizza) -> Pizza { | ^^^^^^^^^ error: type parameter `T` in `Pizza` can't be `Pineapple` --> $DIR/disallow.rs:12:5 | 12 | p | ^ this expression is of type `Pizza` error: type parameter `T` in `Pizza` can't be `Pineapple` --> $DIR/disallow.rs:16:13 | 16 | let _ = Pizza(Pineapple); | ^^^^^^^^^^^^^^^^ this expression is of type `Pizza` error: type parameter `T` in `Pizza` can't be `std::string::String` --> $DIR/disallow.rs:17:13 | 17 | let _ = Pizza(String::new()); | ^^^^^^^^^^^^^^^^^^^^ this expression is of type `Pizza` error: type parameter `T` in `Pizza` can't be `Pineapple` --> $DIR/disallow.rs:19:26 | 19 | let _ = &vec!(Pizza(&Pizza(Pineapple))); | ^^^^^^^^^^^^^^^^ this expression is of type `Pizza` error: type parameter `T` in `Pizza` can't be `&Pineapple` --> $DIR/disallow.rs:20:26 | 20 | let _ = &vec!(Pizza(&Pizza(&Pineapple))); | ^^^^^^^^^^^^^^^^^ this expression is of type `Pizza<&Pineapple>` error: aborting due to 9 previous errors; 3 warnings emitted