Skip to content

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
Contributor

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
Contributor

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

@SimonSapin
Copy link
Contributor Author

@kballard, @steveklabnik: how is this?

@steveklabnik
Copy link
Contributor

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

@steveklabnik
Copy link
Contributor

@SimonSapin ping!

@SimonSapin
Copy link
Contributor Author

Ugh. Updated.

@steveklabnik
Copy link
Contributor

❤️ 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