diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 48f2ae719384e..05a2572fdefe3 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -149,7 +149,7 @@ pub pure fn chain_ref(opt: &Option, #[inline(always)] pub pure fn or(opta: Option, optb: Option) -> Option { /*! - * Returns the leftmost some() value, or none if both are none. + * Returns the leftmost Some() value, or None if both are None. */ match move opta { Some(move opta) => Some(move opta), diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index ab7de6d52ca41..35c1c96befae5 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -114,10 +114,10 @@ variables from reassigned if there may be pointers to their interior) Finally, in some cases, both dangers can arise. For example, something like the following: - let mut x = ~some(5); + let mut x = ~Some(5); match x { - ~some(ref y) => { ... } - ~none => { ... } + ~Some(ref y) => { ... } + ~None => { ... } } In this case, if `x` to be reassigned or `*x` were to be mutated, then diff --git a/src/librustc/middle/borrowck/preserve.rs b/src/librustc/middle/borrowck/preserve.rs index 4f7711c74a698..5916588a9a2bb 100644 --- a/src/librustc/middle/borrowck/preserve.rs +++ b/src/librustc/middle/borrowck/preserve.rs @@ -226,8 +226,8 @@ priv impl &preserve_ctxt { // // As an example, consider this scenario: // - // let mut x = @some(3); - // match *x { Some(y) {...} none {...} } + // let mut x = @Some(3); + // match *x { Some(y) {...} None {...} } // // Technically, the value `x` need only be rooted // in the `some` arm. However, we evaluate `x` in trans @@ -236,8 +236,8 @@ priv impl &preserve_ctxt { // // As a second example, consider *this* scenario: // - // let x = @mut @some(3); - // match x { @@some(y) {...} @@none {...} } + // let x = @mut @Some(3); + // match x { @@Some(y) {...} @@None {...} } // // Here again, `x` need only be rooted in the `some` arm. // In this case, the value which needs to be rooted is diff --git a/src/librustc/middle/trans/type_of.rs b/src/librustc/middle/trans/type_of.rs index c79cf45ec4bba..6a62e622526d7 100644 --- a/src/librustc/middle/trans/type_of.rs +++ b/src/librustc/middle/trans/type_of.rs @@ -100,8 +100,8 @@ fn type_of(cx: @crate_ctxt, t: ty::t) -> TypeRef { // Replace any typedef'd types with their equivalent non-typedef // type. This ensures that all LLVM nominal types that contain // Rust types are defined as the same LLVM types. If we don't do - // this then, e.g. `option<{myfield: bool}>` would be a different - // type than `option`. + // this then, e.g. `Option<{myfield: bool}>` would be a different + // type than `Option`. let t_norm = ty::normalize_ty(cx.tcx, t); if t != t_norm { diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs index aa5eec2b43ce2..3e9a9756a81c6 100644 --- a/src/libstd/net_tcp.rs +++ b/src/libstd/net_tcp.rs @@ -468,7 +468,7 @@ fn read_future(sock: &TcpSocket, timeout_msecs: uint) * } * // this callback is ran when a new connection arrives * {|new_conn, kill_ch| - * let cont_po = core::comm::port::>(); + * let cont_po = core::comm::port::>(); * let cont_ch = core::comm::chan(cont_po); * task::spawn {|| * let accept_result = net::tcp::accept(new_conn); @@ -484,9 +484,9 @@ fn read_future(sock: &TcpSocket, timeout_msecs: uint) * }; * match core::comm::recv(cont_po) { * // shut down listen() - * some(err_data) { core::comm::send(kill_chan, some(err_data)) } + * Some(err_data) { core::comm::send(kill_chan, Some(err_data)) } * // wait for next connection - * none {} + * None {} * } * }; * ~~~~~~~~~~~ @@ -593,7 +593,7 @@ pub fn accept(new_conn: TcpNewConnection) * callback's arguments are: * * `new_conn` - an opaque type that can be passed to * `net::tcp::accept` in order to be converted to a `tcp_socket`. - * * `kill_ch` - channel of type `core::comm::chan>`. + * * `kill_ch` - channel of type `core::comm::chan>`. * this channel can be used to send a message to cause `listen` to begin * closing the underlying libuv data structures. * diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs index 8c6d77c882838..ded0f316a150e 100644 --- a/src/libstd/rope.rs +++ b/src/libstd/rope.rs @@ -893,7 +893,7 @@ pub mod node { * # Return value * * * `option::None` if no transformation happened - * * `option::some(x)` otherwise, in which case `x` has the same contents + * * `option::Some(x)` otherwise, in which case `x` has the same contents * as `node` bot lower height and/or fragmentation. */ pub fn bal(node: @Node) -> Option<@Node> { diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs index f8147c532e679..ce6231afa673d 100644 --- a/src/libstd/timer.rs +++ b/src/libstd/timer.rs @@ -100,11 +100,11 @@ pub fn sleep(iotask: IoTask, msecs: uint) { } /** - * Receive on a port for (up to) a specified time, then return an `option` + * Receive on a port for (up to) a specified time, then return an `Option` * * This call will block to receive on the provided port for up to the * specified timeout. Depending on whether the provided port receives in that - * time period, `recv_timeout` will return an `option` representing the + * time period, `recv_timeout` will return an `Option` representing the * result. * * # Arguments @@ -115,9 +115,9 @@ pub fn sleep(iotask: IoTask, msecs: uint) { * * # Returns * - * An `option` representing the outcome of the call. If the call `recv`'d + * An `Option` representing the outcome of the call. If the call `recv`'d * on the provided port in the allotted timeout period, then the result will - * be a `some(T)`. If not, then `none` will be returned. + * be a `Some(T)`. If not, then `None` will be returned. */ pub fn recv_timeout(iotask: IoTask, msecs: uint,