Skip to content

Commit 514877b

Browse files
committed
---
yaml --- r: 15719 b: refs/heads/try c: f4cc5ff h: refs/heads/master i: 15717: 562516e 15715: db1d4c4 15711: 7f2f393 v: v3
1 parent a6aa151 commit 514877b

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 358dc595382e4f09c4553813f2a12fd8acf1a632
5+
refs/heads/try: f4cc5ff226177009cbb7f9d0a9a9bf4264857500
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libcore/ptr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ unsafe fn memmove<T>(dst: *T, src: *T, count: uint) {
104104
#[doc = "Extension methods for pointers"]
105105
impl extensions<T> for *T {
106106
#[doc = "Returns true if the pointer is equal to the null pointer."]
107-
pure fn is_null<T>() -> bool { is_null(self) }
107+
pure fn is_null() -> bool { is_null(self) }
108108

109109
#[doc = "Returns true if the pointer is not equal to the null pointer."]
110-
pure fn is_not_null<T>() -> bool { is_not_null(self) }
110+
pure fn is_not_null() -> bool { is_not_null(self) }
111111
}
112112

113113
#[test]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn main() {
2+
let p: *int = ptr::null();
3+
assert p.is_null();
4+
assert !p.is_not_null();
5+
6+
let q = ptr::offset(p, 1u);
7+
assert !q.is_null();
8+
assert q.is_not_null();
9+
}

0 commit comments

Comments
 (0)