出るコード
fn main() {
let count = 10;
println!("{}", cnt); // count のタイプミス
}
エラーメッセージ
error[E0425]: cannot find value `cnt` in this scope
直し方
名前のスペルを確認します。ブロック { } の外で宣言した値を参照していないかも確かめます。
Rustのエラー · エラー5
fn main() {
let count = 10;
println!("{}", cnt); // count のタイプミス
}
error[E0425]: cannot find value `cnt` in this scope
名前のスペルを確認します。ブロック { } の外で宣言した値を参照していないかも確かめます。