1 // Ensure that we don't get a cycle error from trying to determine whether an
2 // opaque type implements `Freeze` in safety checking, when it doesn't matter.
6 #![feature(rustc_attrs)]
10 // No need to check for `Freeze` here, there's no
11 // `rustc_layout_scalar_valid_range_start` involved.
12 fn not_restricted(c: bool) -> impl Sized {
14 let x = AnyValue(not_restricted(false));
20 #[rustc_layout_scalar_valid_range_start(1)]
23 // No need to check for `Freeze` here, we're not borrowing the field.
24 fn not_field(c: bool) -> impl Sized {
26 let x = unsafe { NonZero(not_field(false)) };