Add a lint for not using field pattern shorthands

Closes #17792.
Also, I don't think as_str() is necessary here.