os-rust/src/test/ui/not-panic/not-panic-safe-2.rs

14 lines
364 B
Rust
Raw Normal View History

#![allow(dead_code)]
use std::panic::UnwindSafe;
use std::rc::Rc;
use std::cell::RefCell;
fn assert<T: UnwindSafe + ?Sized>() {}
fn main() {
assert::<Rc<RefCell<i32>>>();
//~^ ERROR the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a
2018-06-27 00:07:18 -07:00
//~| ERROR the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a
}