-
Notifications
You must be signed in to change notification settings - Fork 273
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
phantom-data: Add Send
and Sync
columns
#411
Merged
Merged
Conversation
This file contains 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
src/phantom-data.md
Outdated
| Phantom type | `'a` | `T` | `Send` | `Sync` | | ||
|-----------------------------|-----------|-----------------------------|-----------|-----------| | ||
| `PhantomData<T>` | - | covariant (with drop check) | `T: Send` | `T: Sync` | | ||
| `PhantomData<&'a T>` | covariant | covariant | `T: Send` | `T: Sync` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these not both T: Sync
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch, thank you. Fixed.
Enselic
force-pushed
the
phantom-data-send-sync
branch
from
May 30, 2023 08:00
bda5c0c
to
2189dda
Compare
Enselic
force-pushed
the
phantom-data-send-sync
branch
from
June 4, 2023 11:00
2189dda
to
2e37336
Compare
JohnTitor
approved these changes
Jun 4, 2023
Thanks! |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 27, 2023
Update books ## nomicon 2 commits in b5f018fb5930cb733b0a8aaf2eed975d4771e74d..c369e4b489332f8721fbae630354fa83385d457d 2023-05-19 11:10:25 -0700 to 2023-06-04 23:21:07 +0900 - phantom-data: Add `Send` and `Sync` columns (rust-lang/nomicon#411) - Rewrite the chapter on subtyping and variance (rust-lang/nomicon#340) ## reference 5 commits in 553d99b02a53b4133a40d5bd2e19958c67487c00..5ca365eac678cb0d41a20b3204546d6ed70c7171 2023-05-22 10:50:07 -0700 to 2023-06-22 10:13:08 -0700 - Document the ordering behavior of crate cfgs (rust-lang/reference#1369) - fix incorrect syntax for type-paths (rust-lang/reference#1370) - Fix inconsistent formatting of Disambiguating Function Calls example (rust-lang/reference#1366) - Add LoongArch to inline-assembly documentation (rust-lang/reference#1357) - comments: Fix typo: inner -> outer (rust-lang/reference#1364) ## book 1 commits in 8fa6b854d515506d825390fe0d817f5ef0c89350..21cf840842bdf768a798869f06373c96c1cc5122 2023-04-12 20:05:30 -0400 to 2023-06-12 12:24:06 -0400 - Correct `i32` formatting in ch19-05 ## rust-by-example 10 commits in 8ee9528b72b927cff8fd32346db8bbd1198816f0..57636d6926762861f34e030d52ca25a71e95e5bf 2023-05-01 18:18:34 -0300 to 2023-06-20 21:49:11 -0300 - Fixed line number (rust-lang/rust-by-example#1723) - Fix example in from_into.md (rust-lang/rust-by-example#1720) - cast.md improvements for signed boundary case casting (rust-lang/rust-by-example#1719) - Correct commentary about arrays in iter_find.md (rust-lang/rust-by-example#1714) - Improved wording in asm.md (rust-lang/rust-by-example#1717) - fix link to inline assembly reference (rust-lang/rust-by-example#1715) - Fix grammar in string.md (rust-lang/rust-by-example#1713) - Update let-else example with main function (rust-lang/rust-by-example#1711) - Expand `Option::and_then` example to contrast with `map` (rust-lang/rust-by-example#1710) - Add example for destructuring structs without match (rust-lang/rust-by-example#1709) ## rustc-dev-guide 9 commits in f1e6378..17fe3e9 2023-05-17 21:44:05 -0500 to 2023-06-26 18:34:26 +0200 - fix_typo - run-make tests: fix and improve (rust-lang/rustc-dev-guide#1702) - add stub for proof trees (rust-lang/rustc-dev-guide#1700) - Update track_caller reference link (rust-lang/rustc-dev-guide#1688) - Include information about setup defaults in how-to-build guide (rust-lang/rustc-dev-guide#1694) - Fix typo (rust-lang/rustc-dev-guide#1697) - Fix typo in thir.md - Update triagebot links. - name-resolution: Fix some typos in "Scopes and ribs"
danielhenrymantilla
added a commit
to danielhenrymantilla/nomicon
that referenced
this pull request
Aug 7, 2023
- simplify and clarify the auto-traits (_c.f._, rust-lang#411) - No more `-` in the auto-traits part - move `dropck` to its own dedicated column - Name the `'a` and `T` columns with "variance" - Emphasize the `cov` _vs._ `inv` _vs._ `contra` distinctions - Add a mention to the `PhantomPinned` type.
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.
Closes #320