mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
parent
4f6285fbf9
commit
e900dba28a
@ -94,7 +94,7 @@ use option::{None, Option, Some};
|
|||||||
use unstable::finally::Finally;
|
use unstable::finally::Finally;
|
||||||
use unstable::intrinsics;
|
use unstable::intrinsics;
|
||||||
use ptr;
|
use ptr;
|
||||||
use ptr::Ptr;
|
use ptr::RawPtr;
|
||||||
use task;
|
use task;
|
||||||
use vec;
|
use vec;
|
||||||
use vec::OwnedVector;
|
use vec::OwnedVector;
|
||||||
|
@ -43,7 +43,7 @@ pub use path::GenericPath;
|
|||||||
pub use path::Path;
|
pub use path::Path;
|
||||||
pub use path::PosixPath;
|
pub use path::PosixPath;
|
||||||
pub use path::WindowsPath;
|
pub use path::WindowsPath;
|
||||||
pub use ptr::Ptr;
|
pub use ptr::RawPtr;
|
||||||
pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
|
pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
|
||||||
pub use str::{StrVector, StrSlice, OwnedStr, StrUtil};
|
pub use str::{StrVector, StrSlice, OwnedStr, StrUtil};
|
||||||
pub use from_str::{FromStr};
|
pub use from_str::{FromStr};
|
||||||
|
@ -296,7 +296,7 @@ pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub trait Ptr<T> {
|
pub trait RawPtr<T> {
|
||||||
fn is_null(&const self) -> bool;
|
fn is_null(&const self) -> bool;
|
||||||
fn is_not_null(&const self) -> bool;
|
fn is_not_null(&const self) -> bool;
|
||||||
unsafe fn to_option(&const self) -> Option<&T>;
|
unsafe fn to_option(&const self) -> Option<&T>;
|
||||||
@ -304,7 +304,7 @@ pub trait Ptr<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Extension methods for immutable pointers
|
/// Extension methods for immutable pointers
|
||||||
impl<T> Ptr<T> for *T {
|
impl<T> RawPtr<T> for *T {
|
||||||
/// Returns true if the pointer is equal to the null pointer.
|
/// Returns true if the pointer is equal to the null pointer.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn is_null(&const self) -> bool { is_null(*self) }
|
fn is_null(&const self) -> bool { is_null(*self) }
|
||||||
@ -336,7 +336,7 @@ impl<T> Ptr<T> for *T {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Extension methods for mutable pointers
|
/// Extension methods for mutable pointers
|
||||||
impl<T> Ptr<T> for *mut T {
|
impl<T> RawPtr<T> for *mut T {
|
||||||
/// Returns true if the pointer is equal to the null pointer.
|
/// Returns true if the pointer is equal to the null pointer.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn is_null(&const self) -> bool { is_null(*self) }
|
fn is_null(&const self) -> bool { is_null(*self) }
|
||||||
|
@ -56,7 +56,7 @@ Several modules in `core` are clients of `rt`:
|
|||||||
|
|
||||||
#[doc(hidden)];
|
#[doc(hidden)];
|
||||||
|
|
||||||
use ptr::Ptr;
|
use ptr::RawPtr;
|
||||||
|
|
||||||
/// The global (exchange) heap.
|
/// The global (exchange) heap.
|
||||||
pub mod global_heap;
|
pub mod global_heap;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use container::Container;
|
use container::Container;
|
||||||
use ptr::Ptr;
|
use ptr::RawPtr;
|
||||||
use vec;
|
use vec;
|
||||||
use ops::Drop;
|
use ops::Drop;
|
||||||
use libc::{c_uint, uintptr_t};
|
use libc::{c_uint, uintptr_t};
|
||||||
|
@ -38,7 +38,7 @@ use container::Container;
|
|||||||
use option::*;
|
use option::*;
|
||||||
use str::raw::from_c_str;
|
use str::raw::from_c_str;
|
||||||
use to_str::ToStr;
|
use to_str::ToStr;
|
||||||
use ptr::Ptr;
|
use ptr::RawPtr;
|
||||||
use libc;
|
use libc;
|
||||||
use vec;
|
use vec;
|
||||||
use ptr;
|
use ptr;
|
||||||
|
@ -30,7 +30,7 @@ use libc;
|
|||||||
use option::{None, Option, Some};
|
use option::{None, Option, Some};
|
||||||
use old_iter::{BaseIter, EqIter};
|
use old_iter::{BaseIter, EqIter};
|
||||||
use ptr;
|
use ptr;
|
||||||
use ptr::Ptr;
|
use ptr::RawPtr;
|
||||||
use str;
|
use str;
|
||||||
use to_str::ToStr;
|
use to_str::ToStr;
|
||||||
use uint;
|
use uint;
|
||||||
|
@ -26,7 +26,7 @@ use old_iter::CopyableIter;
|
|||||||
use option::{None, Option, Some};
|
use option::{None, Option, Some};
|
||||||
use ptr::to_unsafe_ptr;
|
use ptr::to_unsafe_ptr;
|
||||||
use ptr;
|
use ptr;
|
||||||
use ptr::Ptr;
|
use ptr::RawPtr;
|
||||||
use sys;
|
use sys;
|
||||||
use uint;
|
use uint;
|
||||||
use unstable::intrinsics;
|
use unstable::intrinsics;
|
||||||
|
Loading…
Reference in New Issue
Block a user