2017-06-30から1日間の記事一覧

Rust unsize期待型とキャスト期待型

Rustの期待型は以下のようなデータ構造になっている。 #[derive(Copy, Clone, Debug)] pub enum Expectation<'tcx> { NoExpectation, ExpectHasType(Ty<'tcx>), ExpectCastableToType(Ty<'tcx>), ExpectRvalueLikeUnsized(Ty<'tcx>), } このように4つのコン…