]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-panic/not-panic-safe-2.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / not-panic / not-panic-safe-2.rs
1 #![allow(dead_code)]
2
3 use std::panic::UnwindSafe;
4 use std::rc::Rc;
5 use std::cell::RefCell;
6
7 fn assert<T: UnwindSafe + ?Sized>() {}
8
9 fn main() {
10     assert::<Rc<RefCell<i32>>>();
11     //~^ ERROR the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a
12     //~| ERROR the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a
13 }