Describe the bug
I am getting false positives of rule CA2021 in my project on code that does work at runtime.
To Reproduce
uint[] a = [1, 2, 3];
var sequence = a.Cast<int>();
Here the Cast triggers CA2021, even though generic uint can be casted to int no problem.
Runtime does fail for widening or narrowing conversions (int -> long, etc), so there the diagnostic is correct.
Just this specific path is a false positive.
Exceptions (if any)
No exception
Further technical details
Package 'Microsoft.CodeAnalysis.NetAnalyzers' version 10.0.102