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

Tutorial: confusing paragraph in section 8 #15293

Closed
ianb opened this issue Jul 1, 2014 · 5 comments
Closed

Tutorial: confusing paragraph in section 8 #15293

ianb opened this issue Jul 1, 2014 · 5 comments

Comments

@ianb
Copy link

ianb commented Jul 1, 2014

In section 8 ("Ownership") there is:

If an object doesn't contain any non-Send types, it consists of a single ownership tree and is itself given the Send trait which allows it to be sent between tasks. Custom destructors can only be implemented directly on types that are Send, but non-Send types can still contain types with custom destructors. Example of types which are not Send are Gc and Rc, the shared-ownership types.

This uses a bunch of terms and ideas that haven't been introduced at that stage of the tutorial.

@huonw huonw added the A-docs label Jul 1, 2014
@huonw
Copy link
Member

huonw commented Jul 1, 2014

cc @steveklabnik

@steveklabnik
Copy link
Member

I agree. However, given that I'm currently re-writing it, I don't want to put in a ton of effort to fix this here. I'd love a simple patch to fix this... maybe just link to the other parts where this has been talked about?

@ianb
Copy link
Author

ianb commented Jul 1, 2014

I myself don't understand enough yet to suggest a correction or simplification.

@steveklabnik
Copy link
Member

No worries. Thanks for raising the issue.

bors added a commit that referenced this issue Jul 20, 2014
Simplify example in 5.2 to remove hidden `#[deriving(Show)]`. Traits haven't been introduced yet and now it's easier to just type in the code and expect it to work. Add in some examples for constructing the enum types. Explicitly expose `#![feature(struct_variant)]` in the code to make it more transparent, this bit me when I worked through the tutorial.

Add references in chapter 8 to later chapters describing `Rc`, `Gc` and `Send`. This is a simple fix for #15293.

Simplify vector indexing example in chapter 13 and removed hidden, unnecessary, code. Gave an example usage of the derived `Rand` trait in chapter 17.

Removed references to removed 'extra' crate.
@steveklabnik
Copy link
Member

#15745 should have fixed this, or at least, as much as it's getting fixed, given the tutorial's impending death.

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