diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-03-24 18:59:04 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-03-26 11:48:22 -0700 |
| commit | e5f8026ebab867547514677bf9d7c7870a4345ad (patch) | |
| tree | ed77473ba3e07c0d033acbb06452206ecc390063 /src | |
| parent | 113fbfc795951a10f6c0b08563944bfb6a965956 (diff) | |
| download | rust-e5f8026ebab867547514677bf9d7c7870a4345ad.tar.gz rust-e5f8026ebab867547514677bf9d7c7870a4345ad.zip | |
core: Make sure every module at least has a one-line description
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/cast.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cell.rs | 10 | ||||
| -rw-r--r-- | src/libcore/clone.rs | 15 | ||||
| -rw-r--r-- | src/libcore/comm.rs | 4 | ||||
| -rw-r--r-- | src/libcore/condition.rs | 2 | ||||
| -rw-r--r-- | src/libcore/rt/mod.rs | 2 |
6 files changed, 30 insertions, 5 deletions
diff --git a/src/libcore/cast.rs b/src/libcore/cast.rs index f752f52ce53..c1c7bd23770 100644 --- a/src/libcore/cast.rs +++ b/src/libcore/cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! Unsafe casting functions + pub mod rusti { #[abi = "rust-intrinsic"] #[link_name = "rusti"] diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index bf5f9315938..2c29dbd2e94 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -8,13 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! A mutable, nullable memory location + use cast::transmute; use option; use prelude::*; -/// A dynamic, mutable location. -/// -/// Similar to a mutable option type, but friendlier. +/* +A dynamic, mutable location. + +Similar to a mutable option type, but friendlier. +*/ pub struct Cell<T> { mut value: Option<T> diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index af44f68601b..7b86355c91e 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -8,9 +8,20 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -/** -Clonable types are copied with the clone method +/*! The Clone trait for types that cannot be "implicitly copied" + +In Rust, some simple types are "implicitly copyable" and when you +assign them or pass them as arguments, the receiver will get a copy, +leaving the original value in place. These types do not require +allocation to copy and do not have finalizers (i.e. they do not +contain owned pointers or implement `Drop`), so the compiler considers +them cheap and safe to copy and automatically implements the `Copy` +trait for them. For other types copies must be made explicitly, +by convention implementing the `Clone` trait and calling the +`clone` method. + */ + pub trait Clone { fn clone(&self) -> Self; } diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs index 6dadca8dc57..f749d46bcab 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -8,6 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +/*! +Message passing +*/ + use cast; use either::{Either, Left, Right}; use kinds::Owned; diff --git a/src/libcore/condition.rs b/src/libcore/condition.rs index 767b6ecfad4..6b5d8b91439 100644 --- a/src/libcore/condition.rs +++ b/src/libcore/condition.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +/*! Condition handling */ + use prelude::*; use task; use task::local_data::{local_data_pop, local_data_set}; diff --git a/src/libcore/rt/mod.rs b/src/libcore/rt/mod.rs index 04891a1673c..a7b3fb1355c 100644 --- a/src/libcore/rt/mod.rs +++ b/src/libcore/rt/mod.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[doc(hidden)]; + use libc::c_char; // Some basic logging |
