-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement variance RFC #738 #22286
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
Closed
Closed
Implement variance RFC #738 #22286
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2594d56
Introduce the new phantomdata/phantomfn markers and integrate them
nikomatsakis 91eedfe
Report errors for type parameters that are not constrained, either by
nikomatsakis 8c841f2
Extend coherence check to understand subtyping.
nikomatsakis 801bc48
Rewrite `Unique<T>` so that it is covariant in T, implies `NonZero` a…
nikomatsakis f2529ac
Constrain operands to outlive the operation. Fixes #21422.
nikomatsakis c5579ca
Fallout: Port Vec to use `Unique`
nikomatsakis b3c00a6
Fallout: btree. Rephrase invariant lifetime in terms of PhantomData.
nikomatsakis 68ebe64
Fallout: port btree to use Unique, some markers.
nikomatsakis c2891cc
Fallout: EnumSet, add Marker.
nikomatsakis 8dbdcdb
Fallout: RingBuf, use Unique.
nikomatsakis 2bcf3a4
Fallout: arena needs to use phantomdata since invariantlifetime is gone
nikomatsakis 1735e41
Fallout: AtomicPtr needs phantom data to indicate that it contains an…
nikomatsakis d801a4d
Fallout: iter, add markers or other changes such that all type parame…
nikomatsakis ef42c2b
Fallout: docs, elided examples often elided too much.
nikomatsakis 872ce47
Fallout: tests. As tests frequently elide things, lots of changes
nikomatsakis 60f507b
Fallout: remove unused type and region parameters.
nikomatsakis aaf4176
Fallout: Port slice to use `PhantomData` instead of `ContravariantLif…
nikomatsakis 2953710
Fallout: port libflate to new Unique API
nikomatsakis 199b992
Fallout: add phantom data to librand
nikomatsakis 62b5177
Fallout: add phantom data to the type inferencer
nikomatsakis 1ed5842
Fallout: extend thread with phantomdata for `'a` lifetime
nikomatsakis 9e0bb52
Fallout: add phantomdata for 'a in path
nikomatsakis ae7c534
Fallout: port hashmap to use Unique
nikomatsakis 6f2a1c9
Fallout: add phantomdata to hash
nikomatsakis df76442
Fallout: Accepter trait needs phantomdata. This seems like it should
nikomatsakis d179bb5
Add regression test for #20533. Fixes #20533.
nikomatsakis e8cb11c
Missing test.
nikomatsakis a2393e6
WIP -- improve documentation on the phantom traits
nikomatsakis d622235
Add deprecated versions of the old markers and integrate them back in…
nikomatsakis 74199c2
Try to write some basic docs.
nikomatsakis f5491e6
Stabilize Send/Sync.
nikomatsakis cc61f9c
Minor unused imports etc.
nikomatsakis 9f8b9d6
Update tests to use #[feature(rustc_attrs)]
nikomatsakis 2e482cd
Mark intentionally buggy test as ignore
nikomatsakis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
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.
Space after lifetime name is missing ?