(Bound::Unbounded, Bound::Unbounded) => {},
_ => self.require_unsafe(
"initializing type with `rustc_layout_scalar_valid_range` attr",
- "initializing `NonZero` with a `0` violates layout constraints \
- and is undefined behavior",
+ "initializing a layout restricted type's field with a value outside \
+ the valid range is undefined behavior",
UnsafetyViolationKind::MinConstFn,
),
}
LL | let _x = NonZero(0); //~ ERROR initializing type with `rustc_layout_scalar_valid_range` attr
| ^^^^^^^^^^ initializing type with `rustc_layout_scalar_valid_range` attr
|
- = note: initializing `NonZero` with a `0` violates layout constraints and is undefined behavior
+ = note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
error: aborting due to previous error