Skip to content

variable_bindings/declare.md: Contradictory statements about uninitialized variables. #1900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zanedp opened this issue Dec 5, 2024 · 0 comments

Comments

@zanedp
Copy link
Contributor

zanedp commented Dec 5, 2024

It says not initializing a variable when it's declared may lead to use of uninitialized variables, but the sentence after the example says the compiler forbids the use of an uninitialized variable. If the compiler forbids using uninitialized variables, it's not possible to use an uninitialized variable.

The part saying this form is seldom used because it could lead to the use of uninitialized variables should be removed, since it's not possible in Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant