public static void PortableCastToTypeContainsReferences()
{
ReadOnlySpan<uint> span = new ReadOnlySpan<uint>(Array.Empty<uint>());
AssertThrows<ArgumentException, uint>(span, (_span) => _span.NonPortableCast<uint, StructWithReferences>().DontBox());
}