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

Remove mention of ~T in the FFI guide. #16393

Closed
wants to merge 1 commit into from

Conversation

SimonSapin
Copy link
Contributor

No description provided.

@SimonSapin
Copy link
Contributor Author

By the way, do we have the nullable pointer optimization for any of the library pointer types now?

@lilyball
Copy link
Contributor

lilyball commented Aug 9, 2014

Presumably Box<T> benefits from the optimization, though I can't verify that right now.

@huonw
Copy link
Member

huonw commented Aug 9, 2014

It does; the removal of ~ was just renaming the syntax, the compiler internals haven't changed.

@@ -527,8 +527,8 @@ the `libc` module, and Rust links against `libc` and `libm` by default.
# The "nullable pointer optimization"

Certain types are defined to not be `null`. This includes references (`&T`,
`&mut T`), owning pointers (`~T`), and function pointers (`extern "abi"
fn()`). When interfacing with C, pointers that might be null are often used.
`&mut T`), and function pointers (`extern "abi" fn()`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comma on this line is no longer appropriate, as the list now only has 2 elements.

@steveklabnik
Copy link
Member

@SimonSapin can you fix the problem @kballard has pointed out?

@SimonSapin
Copy link
Contributor Author

@kballard, @steveklabnik: how is this?

@steveklabnik
Copy link
Member

Sorry, I should have mentioned that they're called 'boxes', not 'owning pointers.' After that, :shipit:

@steveklabnik
Copy link
Member

@SimonSapin ping!

@SimonSapin
Copy link
Contributor Author

Ugh. Updated.

@steveklabnik
Copy link
Member

❤️ thank you!

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Aug 29, 2014
@bors bors closed this Aug 31, 2014
@SimonSapin SimonSapin deleted the patch-9 branch September 20, 2014 19:25
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 this pull request may close these issues.

6 participants