-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1778b63 provided the guarantee of no `exchange_free` calls for ~ZeroSizeType, so a sentinel can now be used without overhead. Closes #11998
- Loading branch information
1 parent
3786b55
commit 05d0045
Showing
3 changed files
with
44 additions
and
9 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
pub fn main() { | ||
assert!(Some(~()).is_some()); | ||
|
||
struct Foo; | ||
assert!(Some(~Foo).is_some()); | ||
|
||
let xs: ~[()] = ~[]; | ||
assert!(Some(xs).is_some()); | ||
} |
05d0045
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 pnkfelix
at https://github.com/thestinger/rust/commit/05d0045c2c8c692492918d6720ef417431518ead
05d0045
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 thestinger/rust/zero_size_non_null = 05d0045 into auto
05d0045
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.
thestinger/rust/zero_size_non_null = 05d0045 merged ok, testing candidate = 13dc788d
05d0045
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.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2003
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5015
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5015
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4107
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4121
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5115
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4202
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4210
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5117
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4202
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4207
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/4273
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5114
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4211
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4222
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4878
05d0045
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 pnkfelix
at https://github.com/thestinger/rust/commit/05d0045c2c8c692492918d6720ef417431518ead
05d0045
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 thestinger/rust/zero_size_non_null = 05d0045 into auto
05d0045
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.
thestinger/rust/zero_size_non_null = 05d0045 merged ok, testing candidate = f49c8764
05d0045
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.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2006
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5018
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5018
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4110
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4124
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5118
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4205
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4213
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5120
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4205
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4210
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/4276
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5117
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4214
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4225
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4881
05d0045
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 pnkfelix
at https://github.com/thestinger/rust/commit/05d0045c2c8c692492918d6720ef417431518ead
05d0045
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 thestinger/rust/zero_size_non_null = 05d0045 into auto
05d0045
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.
thestinger/rust/zero_size_non_null = 05d0045 merged ok, testing candidate = 72bcdf06
05d0045
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.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2008
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5020
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5020
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4112
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4126
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5120
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4207
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4215
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5122
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4207
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4212
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/4278
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5119
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4216
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4227
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4883