diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-25 12:47:34 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-28 11:53:58 -0700 |
| commit | 0dfc90ab15475aa64bea393671463a8e9784ae3f (patch) | |
| tree | 41c9c856c504f33552abe4a0eca9fbdc3d5d215d /src/libsyntax | |
| parent | 2823be08b7d1b9106cbbd454437384c093c5a5fa (diff) | |
| download | rust-0dfc90ab15475aa64bea393671463a8e9784ae3f.tar.gz rust-0dfc90ab15475aa64bea393671463a8e9784ae3f.zip | |
Rename all raw pointers as necessary
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/owned_slice.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/libsyntax/owned_slice.rs b/src/libsyntax/owned_slice.rs index 016dd879dcd..530ea013112 100644 --- a/src/libsyntax/owned_slice.rs +++ b/src/libsyntax/owned_slice.rs @@ -69,9 +69,9 @@ impl<T> OwnedSlice<T> { static PTR_MARKER: u8 = 0; let ptr = if self.data.is_null() { // length zero, i.e. this will never be read as a T. - &PTR_MARKER as *u8 as *T + &PTR_MARKER as *const u8 as *const T } else { - self.data as *T + self.data as *const T }; let slice: &[T] = unsafe {mem::transmute(raw::Slice { diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 97e99ca692d..e23378a592b 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -479,7 +479,11 @@ impl<'a> State<'a> { } ast::TyPtr(ref mt) => { try!(word(&mut self.s, "*")); - try!(self.print_mt(mt)); + match mt.mutbl { + ast::MutMutable => try!(self.word_nbsp("mut")), + ast::MutImmutable => try!(self.word_nbsp("const")), + } + try!(self.print_type(&*mt.ty)); } ast::TyRptr(ref lifetime, ref mt) => { try!(word(&mut self.s, "&")); |
