問題タブ [memory-safety]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
985 参照

c - なぜ錆で構造を初期化する必要があるのですか?

CI では、まだ初期化されていない構造体を使用できます。Rustでこのコードを試しました:

しかし、コンパイルエラーが発生しました:

これが C では許可されているのに、Rust ではエラーになるのはなぜですか?