See item 1 from dotnet/csharplang#1502.
Please add a way to get warnings for situations in which the compiler would or does produce a defensive copy for a struct type that has some particular new attribute on it. This should be under control of a warning wave (i.e. the warning is off by default so as to reduce compatibility issues*).
*the compatibility concern is that code that uses the attribute and for which there is a defensive copy produces no diagnostic in an older version of the compiler, but does produce a diagnostic in a new version of the compiler.
See item 1 from dotnet/csharplang#1502.
Please add a way to get warnings for situations in which the compiler would or does produce a defensive copy for a struct type that has some particular new attribute on it. This should be under control of a warning wave (i.e. the warning is off by default so as to reduce compatibility issues*).
*the compatibility concern is that code that uses the attribute and for which there is a defensive copy produces no diagnostic in an older version of the compiler, but does produce a diagnostic in a new version of the compiler.