Fix error message on invalid field names for a struct variant

Fixes #19922.
Could you put a block around this `format!` invocation if you're going to stagger it like that?