Merged
Conversation
expressions/operator-expr.mdexpressions/operator-expr.md
Centril
approved these changes
Mar 28, 2019
expressions/operator-expr.md
Centril
approved these changes
Mar 28, 2019
Centril
approved these changes
Mar 28, 2019
Syntax is not highlighted in <https://doc.rust-lang.org/reference/type-layout.html#reprc-unions>
Centril
approved these changes
Mar 28, 2019
Centril
reviewed
Mar 28, 2019
Co-Authored-By: u32i64 <aymfst@gmail.com>
Centril
approved these changes
Mar 28, 2019
awaitlink
commented
Mar 28, 2019
| For generic types (counting the built-in types above as generic over `T`), if an | ||
| For generic types (counting the built-in types above as generic over `T`), if a | ||
| generic implementation is available, then the compiler does not automatically | ||
| implement it for types that could use the implementation except that they do not |
Contributor
Author
There was a problem hiding this comment.
@Centril Perhaps this can be re-phrased? I can't seem to understand what the except that they do not meet... part means. Does that mean except if they or except then they...
Contributor
There was a problem hiding this comment.
Consider:
struct A<T>(T);
unsafe impl<T: Copy> Send for A<T> {}
fn assert_send<T: Send>() {}
fn main() {
assert_send::<A<u8>>();
assert_send::<A<String>>();
}
Contributor
Author
There was a problem hiding this comment.
So the compiler would have done this (and does so if we comment out our unsafe impl):
unsafe impl Send for A<String> {}
// as part of:
unsafe impl Send for A<T> where T: Send {}But our unsafe impl tells the compiler to disregard its auto trait rules and instead use our "rule" (impl), i.e. we tell the compiler that it is not safe to Send values of type A<T> unless T: Copy?
Contributor
Author
|
@Centril I think this is ready for merging now. |
Contributor
|
Yep; Thanks! |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 6, 2019
Update books ## nomicon 1 commits in f1ff93b66844493a7b03101c7df66ac958c62418..c02e0e7754a76886e55b976a3a4fac20100cd35d 2019-02-26 13:37:28 -0500 to 2019-03-25 16:52:56 -0400 - dropck: The drop order is now defined (rust-lang/nomicon#113) ## reference 3 commits in 27ad493..98f90ff 2019-03-26 02:06:15 +0100 to 2019-04-06 09:29:08 -0700 - Document repr packed(N). (rust-lang/reference#553) - Fix broken link in glossary. (rust-lang/reference#558) - Typo fixes (rust-lang/reference#556) ## embedded-book 2 commits in 07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a..7989c723607ef5b13b57208022259e6c771e11d0 2019-03-27 15:40:52 +0000 to 2019-04-04 12:14:37 +0000 - fix rust-embedded/book#182 (rust-embedded/book#183) - Add openocd to list of installable packages (rust-embedded/book#179)
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 6, 2019
Update books ## nomicon 1 commits in f1ff93b66844493a7b03101c7df66ac958c62418..c02e0e7754a76886e55b976a3a4fac20100cd35d 2019-02-26 13:37:28 -0500 to 2019-03-25 16:52:56 -0400 - dropck: The drop order is now defined (rust-lang/nomicon#113) ## reference 3 commits in 27ad493..98f90ff 2019-03-26 02:06:15 +0100 to 2019-04-06 09:29:08 -0700 - Document repr packed(N). (rust-lang/reference#553) - Fix broken link in glossary. (rust-lang/reference#558) - Typo fixes (rust-lang/reference#556) ## embedded-book 2 commits in 07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a..7989c723607ef5b13b57208022259e6c771e11d0 2019-03-27 15:40:52 +0000 to 2019-04-04 12:14:37 +0000 - fix rust-embedded/book#182 (rust-embedded/book#183) - Add openocd to list of installable packages (rust-embedded/book#179)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes various typos.