Skip to content
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

Slightly confusing language in variable-bindings.md #20840

Closed
trevorloflin opened this issue Jan 9, 2015 · 1 comment · Fixed by #21023
Closed

Slightly confusing language in variable-bindings.md #20840

trevorloflin opened this issue Jan 9, 2015 · 1 comment · Fixed by #21023

Comments

@trevorloflin
Copy link

On line 91, the book states: "bindings are required to be initialized with a value". However, the example error that it gives, "error: cannot determine a type for this local variable", is not about initialization but rather about declaration. This is immediately confirmed when "let x: i32;" is shown to compile. Only several lines later, on lines 133 and following, does the book show an actual uninitialized variable error. For people new to complex type systems, it is important to explain the distinction between an uninitialized value and an undeclared (and non-inferable) type.

@steveklabnik
Copy link
Member

Yes, this error message changed, it used to explicitly talk about not initializing. I should re-evaluate the wording of this section.

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

Successfully merging a pull request may close this issue.

2 participants