Skip to content

Slight issue in book (Compound Data Types section) #21829

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
budleigh opened this issue Feb 1, 2015 · 2 comments
Closed

Slight issue in book (Compound Data Types section) #21829

budleigh opened this issue Feb 1, 2015 · 2 comments

Comments

@budleigh
Copy link

budleigh commented Feb 1, 2015

In one of the tuple examples in the compound data types section (beginner), the docs show that

let x = (1, 2, 3);
let y = (2, 2, 4);

are not equivalent tuples by saying the following:

This will print no, because some of the values aren't equal.

To me, this implies that the following WOULD be equivalent:

let x = (1, 2, 3);
let y = (2, 1, 3);

because all of the values are the same, but the compiler says the tuples are different. Perhaps add a note about value ordering being important to tuple equivalency or show another example.

@steveklabnik
Copy link
Member

Agreed, this should be clarified.

Manishearth added a commit to Manishearth/rust that referenced this issue Feb 10, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this issue Feb 10, 2015
@mdinger
Copy link
Contributor

mdinger commented Feb 12, 2015

Looks fixed by #22007

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

3 participants