-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Arc::make_unique check weak refs; add make_unique to Rc
This patch makes `Arc::make_unique` examine the number of weak references as well as strong references, which is required for safety. It also adds a `make_unique` method to the `Rc` type for consistency. Closes #14521.
- Loading branch information
Showing
2 changed files
with
107 additions
and
1 deletion.
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
7889c95
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.
saw approval from alexcrichton, alexcrichton, me
at aturon@7889c95
7889c95
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.
merging aturon/rust/make_unique = 7889c95 into auto
7889c95
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.
aturon/rust/make_unique = 7889c95 merged ok, testing candidate = 32b6fc1
7889c95
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/6004
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/6002
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/5098
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/5106
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/6102
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/5190
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/5198
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/6104
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/5189
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/5195
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/5255
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2991
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/6094
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/5190
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/5205
7889c95
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.
fast-forwarding master to auto = 32b6fc1