2020-03-10から1日間の記事一覧
まだ時間がなくて詳しくは調べてないけど、こういう書き方はできない。まあそうかなと思う。 use std::fmt::Display; struct S<T> (T); fn main() { let s: Box<S<dyn Display>> = Box::new(S("")); } Compiling playground v0.0.1 (/playground) error[E0277]: the size for v</s<dyn></t>…
まだ時間がなくて詳しくは調べてないけど、こういう書き方はできない。まあそうかなと思う。 use std::fmt::Display; struct S<T> (T); fn main() { let s: Box<S<dyn Display>> = Box::new(S("")); } Compiling playground v0.0.1 (/playground) error[E0277]: the size for v</s<dyn></t>…