File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 758895718c8883376f9faff883247b8abe937bca
4
+ refs/heads/try: d2e802b827d5020c89e1d3290fe13602386a4b33
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -863,8 +863,8 @@ method of RawVec.
863
863
impl <T > RawVec <T > {
864
864
fn new () -> Self {
865
865
unsafe {
866
- // -1 is usize::MAX. This branch should be stripped at compile time.
867
- let cap = if mem :: size_of :: <T >() == 0 { - 1 } else { 0 };
866
+ // !0 is usize::MAX. This branch should be stripped at compile time.
867
+ let cap = if mem :: size_of :: <T >() == 0 { ! 0 } else { 0 };
868
868
869
869
// heap::EMPTY doubles as "unallocated" and "zero-sized allocation"
870
870
RawVec { ptr : Unique :: new (heap :: EMPTY as * mut T ), cap : cap }
@@ -1036,8 +1036,8 @@ struct RawVec<T> {
1036
1036
impl <T > RawVec <T > {
1037
1037
fn new () -> Self {
1038
1038
unsafe {
1039
- // -1 is usize::MAX. This branch should be stripped at compile time.
1040
- let cap = if mem :: size_of :: <T >() == 0 { - 1 } else { 0 };
1039
+ // !0 is usize::MAX. This branch should be stripped at compile time.
1040
+ let cap = if mem :: size_of :: <T >() == 0 { ! 0 } else { 0 };
1041
1041
1042
1042
// heap::EMPTY doubles as "unallocated" and "zero-sized allocation"
1043
1043
RawVec { ptr : Unique :: new (heap :: EMPTY as * mut T ), cap : cap }
You can’t perform that action at this time.
0 commit comments