1. 21 1月, 2015 1 次提交
  2. 16 1月, 2015 1 次提交
  3. 07 1月, 2015 4 次提交
  4. 06 1月, 2015 3 次提交
  5. 05 1月, 2015 1 次提交
    • A
      std: Fix missing stability in sync · 177f8bc5
      Alex Crichton 提交于
      * The `sync` module is stable
      * The `sync::mpsc` module is stable
      * The `Sender::send` method is stable.
      * The `Once::doit` method is now removed.
      * Deprecated atomic initializers are removed.
      * Renamed atomic initializers are now stable.
      177f8bc5
  6. 04 1月, 2015 2 次提交
  7. 03 1月, 2015 1 次提交
  8. 30 12月, 2014 2 次提交
    • A
      std: Second pass stabilization for `comm` · bc83a009
      Alex Crichton 提交于
      This commit is a second pass stabilization for the `std::comm` module,
      performing the following actions:
      
      * The entire `std::comm` module was moved under `std::sync::mpsc`. This movement
        reflects that channels are just yet another synchronization primitive, and
        they don't necessarily deserve a special place outside of the other
        concurrency primitives that the standard library offers.
      * The `send` and `recv` methods have all been removed.
      * The `send_opt` and `recv_opt` methods have been renamed to `send` and `recv`.
        This means that all send/receive operations return a `Result` now indicating
        whether the operation was successful or not.
      * The error type of `send` is now a `SendError` to implement a custom error
        message and allow for `unwrap()`. The error type contains an `into_inner`
        method to extract the value.
      * The error type of `recv` is now `RecvError` for the same reasons as `send`.
      * The `TryRecvError` and `TrySendError` types have had public reexports removed
        of their variants and the variant names have been tweaked with enum
        namespacing rules.
      * The `Messages` iterator is renamed to `Iter`
      
      This functionality is now all `#[stable]`:
      
      * `Sender`
      * `SyncSender`
      * `Receiver`
      * `std::sync::mpsc`
      * `channel`
      * `sync_channel`
      * `Iter`
      * `Sender::send`
      * `Sender::clone`
      * `SyncSender::send`
      * `SyncSender::try_send`
      * `SyncSender::clone`
      * `Receiver::recv`
      * `Receiver::try_recv`
      * `Receiver::iter`
      * `SendError`
      * `RecvError`
      * `TrySendError::{mod, Full, Disconnected}`
      * `TryRecvError::{mod, Empty, Disconnected}`
      * `SendError::into_inner`
      * `TrySendError::into_inner`
      
      This is a breaking change due to the modification of where this module is
      located, as well as the changing of the semantics of `send` and `recv`. Most
      programs just need to rename imports of `std::comm` to `std::sync::mpsc` and
      add calls to `unwrap` after a send or a receive operation.
      
      [breaking-change]
      bc83a009
    • A
      std: Stabilize the prelude module · c32d03f4
      Alex Crichton 提交于
      This commit is an implementation of [RFC 503][rfc] which is a stabilization
      story for the prelude. Most of the RFC was directly applied, removing reexports.
      Some reexports are kept around, however:
      
      * `range` remains until range syntax has landed to reduce churn.
      * `Path` and `GenericPath` remain until path reform lands. This is done to
        prevent many imports of `GenericPath` which will soon be removed.
      * All `io` traits remain until I/O reform lands so imports can be rewritten all
        at once to `std::io::prelude::*`.
      
      This is a breaking change because many prelude reexports have been removed, and
      the RFC can be consulted for the exact list of removed reexports, as well as to
      find the locations of where to import them.
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
      [breaking-change]
      
      Closes #20068
      c32d03f4
  9. 29 12月, 2014 2 次提交
  10. 27 12月, 2014 5 次提交
  11. 23 12月, 2014 1 次提交
  12. 20 12月, 2014 1 次提交
    • A
      Stabilize clone · 92ccc073
      Aaron Turon 提交于
      This patch marks `clone` stable, as well as the `Clone` trait, but
      leaves `clone_from` unstable. The latter will be decided by the beta.
      
      The patch also marks most manual implementations of `Clone` as stable,
      except where the APIs are otherwise deprecated or where there is
      uncertainty about providing `Clone`.
      92ccc073
  13. 19 12月, 2014 7 次提交
    • J
      libstd: use `#[deriving(Copy)]` · a77e8a63
      Jorge Aparicio 提交于
      a77e8a63
    • A
      Delete rest of rustrt · 0ce5faaa
      Aaron Turon 提交于
      ... and address other rebasing fallout.
      0ce5faaa
    • A
      Revise std::thread API to join by default · a27fbac8
      Aaron Turon 提交于
      This commit is part of a series that introduces a `std::thread` API to
      replace `std::task`.
      
      In the new API, `spawn` returns a `JoinGuard`, which by default will
      join the spawned thread when dropped. It can also be used to join
      explicitly at any time, returning the thread's result. Alternatively,
      the spawned thread can be explicitly detached (so no join takes place).
      
      As part of this change, Rust processes now terminate when the main
      thread exits, even if other detached threads are still running, moving
      Rust closer to standard threading models. This new behavior may break code
      that was relying on the previously implicit join-all.
      
      In addition to the above, the new thread API also offers some built-in
      support for building blocking abstractions in user space; see the module
      doc for details.
      
      Closes #18000
      
      [breaking-change]
      a27fbac8
    • A
      Fallout from new thread API · 43ae4b33
      Aaron Turon 提交于
      43ae4b33
    • A
      Add blocking support module for channels · 7fd7ce68
      Aaron Turon 提交于
      7fd7ce68
    • A
      libs: merge librustrt into libstd · 2b3477d3
      Aaron Turon 提交于
      This commit merges the `rustrt` crate into `std`, undoing part of the
      facade. This merger continues the paring down of the runtime system.
      
      Code relying on the public API of `rustrt` will break; some of this API
      is now available through `std::rt`, but is likely to change and/or be
      removed very soon.
      
      [breaking-change]
      2b3477d3
    • P
      librustc: Always parse `macro!()`/`macro![]` as expressions if not · ddb2466f
      Patrick Walton 提交于
      followed by a semicolon.
      
      This allows code like `vec![1i, 2, 3].len();` to work.
      
      This breaks code that uses macros as statements without putting
      semicolons after them, such as:
      
          fn main() {
              ...
              assert!(a == b)
              assert!(c == d)
              println(...);
          }
      
      It also breaks code that uses macros as items without semicolons:
      
          local_data_key!(foo)
      
          fn main() {
              println("hello world")
          }
      
      Add semicolons to fix this code. Those two examples can be fixed as
      follows:
      
          fn main() {
              ...
              assert!(a == b);
              assert!(c == d);
              println(...);
          }
      
          local_data_key!(foo);
      
          fn main() {
              println("hello world")
          }
      
      RFC #378.
      
      Closes #18635.
      
      [breaking-change]
      ddb2466f
  14. 15 12月, 2014 1 次提交
  15. 14 12月, 2014 1 次提交
  16. 09 12月, 2014 1 次提交
    • N
      librustc: Make `Copy` opt-in. · 096a2860
      Niko Matsakis 提交于
      This change makes the compiler no longer infer whether types (structures
      and enumerations) implement the `Copy` trait (and thus are implicitly
      copyable). Rather, you must implement `Copy` yourself via `impl Copy for
      MyType {}`.
      
      A new warning has been added, `missing_copy_implementations`, to warn
      you if a non-generic public type has been added that could have
      implemented `Copy` but didn't.
      
      For convenience, you may *temporarily* opt out of this behavior by using
      `#![feature(opt_out_copy)]`. Note though that this feature gate will never be
      accepted and will be removed by the time that 1.0 is released, so you should
      transition your code away from using it.
      
      This breaks code like:
      
          #[deriving(Show)]
          struct Point2D {
              x: int,
              y: int,
          }
      
          fn main() {
              let mypoint = Point2D {
                  x: 1,
                  y: 1,
              };
              let otherpoint = mypoint;
              println!("{}{}", mypoint, otherpoint);
          }
      
      Change this code to:
      
          #[deriving(Show)]
          struct Point2D {
              x: int,
              y: int,
          }
      
          impl Copy for Point2D {}
      
          fn main() {
              let mypoint = Point2D {
                  x: 1,
                  y: 1,
              };
              let otherpoint = mypoint;
              println!("{}{}", mypoint, otherpoint);
          }
      
      This is the backwards-incompatible part of #13231.
      
      Part of RFC #3.
      
      [breaking-change]
      096a2860
  17. 06 12月, 2014 1 次提交
  18. 25 11月, 2014 1 次提交
    • A
      Merge libsync into libstd · 985acfdb
      Aaron Turon 提交于
      This patch merges the `libsync` crate into `libstd`, undoing part of the
      facade. This is in preparation for ultimately merging `librustrt`, as
      well as the upcoming rewrite of `sync`.
      
      Because this removes the `libsync` crate, it is a:
      
      [breaking-change]
      
      However, all uses of `libsync` should be able to reroute through
      `std::sync` and `std::comm` instead.
      985acfdb
  19. 21 11月, 2014 2 次提交
    • A
      Make most of std::rt private · 6987ad22
      Aaron Turon 提交于
      Previously, the entire runtime API surface was publicly exposed, but
      that is neither necessary nor desirable. This commit hides most of the
      module, using librustrt directly as needed. The arrangement will need to
      be revisited when rustrt is pulled into std.
      
      [breaking-change]
      6987ad22
    • A
      Fallout from libgreen and libnative removal · 40c78ab0
      Aaron Turon 提交于
      40c78ab0
  20. 17 11月, 2014 1 次提交
    • S
      Switch to purely namespaced enums · 3dcd2157
      Steven Fackler 提交于
      This breaks code that referred to variant names in the same namespace as
      their enum. Reexport the variants in the old location or alter code to
      refer to the new locations:
      
      ```
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = A;
      }
      ```
      =>
      ```
      pub use self::Foo::{A, B};
      
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = A;
      }
      ```
      or
      ```
      pub enum Foo {
          A,
          B
      }
      
      fn main() {
          let a = Foo::A;
      }
      ```
      
      [breaking-change]
      3dcd2157
  21. 12 11月, 2014 1 次提交