According to experimentation, to silence errors in tests in the "Problems" section of VS Code, what works is setting
{
"rust-analyzer.check.allTargets": false
}
though I'm not yet sure if that may perhaps be a little too strict and perhaps will disable other configurations as well