Can `fmt::Display` not be implemented for Vec<T> where T is a concrete type?

1
open
corneliusroemer
corneliusroemer
Posted 2 months ago

Can `fmt::Display` not be implemented for Vec<T> where T is a concrete type? #1669

Reading this paragraph: https://github.com/rust-lang/rust-by-example/blob/a9fb7d13eadfcc5f457962731f105b97f9a7474a/src/hello/print/print_display.md?plain=1#L39-L44 I find it hard to believe that Display can't be implemented for Vec for concrete types T.

If that's the case, then must is too strong a word.

corneliusroemer
corneliusroemer
Created 2 months ago

I see, it really doesn't work without quite some extra code, so must seems almost right, maybe a subsentence could be added "or the concrete Vec must be wrapped in newtype, see here"