error: not expected here; the #[error(...)] attribute belongs on top of a struct or an enum variant --> tests/ui/unexpected-field-fmt.rs:6:9 | 6 | #[error("...")] | ^^^^^^^^^^^^^^^