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