teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

追記

2019/09/29 13:09

投稿

meg_
meg_

スコア10944

answer CHANGED
@@ -1,1 +1,6 @@
1
- [Rust Documentation 型間のキャスト](https://doc.rust-jp.rs/the-rust-programming-language-ja/1.6/book/casting-between-types.html)
1
+ [Rust Documentation 型間のキャスト](https://doc.rust-jp.rs/the-rust-programming-language-ja/1.6/book/casting-between-types.html)
2
+
3
+ let x: i32 = 5;
4
+ let y = x as i64;
5
+
6
+ 上記例が載っていました。