There's history. Back in Rust 2015 edition, you didn't need the dyn keyword to request dynamic dispatch on a trait object; you just wrote fn view(_: &StateTrait), and the compiler "knew" that you meant what we now write as fn view(_: &dyn StateTrait).
I suspect the suggestion hasn't been updated since the days when adding dyn was almost certainly the right thing to do, and I'd file a diagnostic issue explaining what you'd expect the compiler to offer as help (something like "for dynamic dispatch, add dyn, for static dispatch use a generic parameter")