1. 03 1月, 2015 1 次提交
  2. 02 1月, 2015 1 次提交
  3. 01 1月, 2015 1 次提交
  4. 31 12月, 2014 3 次提交
  5. 24 12月, 2014 1 次提交
  6. 23 12月, 2014 1 次提交
    • N
      Insert coercions to fn pointer types required for the new types · 8fe9e4df
      Niko Matsakis 提交于
      post-unboxed-closure-conversion. This requires a fair amount of
      annoying coercions because all the `map` etc types are defined
      generically over the `F`, so the automatic coercions don't propagate;
      this is compounded by the need to use `let` and not `as` due to
      stage0. That said, this pattern is to a large extent temporary and
      unusual.
      8fe9e4df
  7. 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
  8. 19 12月, 2014 2 次提交
    • J
      libcore: use `#[deriving(Copy)]` · 30cefcbd
      Jorge Aparicio 提交于
      30cefcbd
    • 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
  9. 15 12月, 2014 1 次提交
  10. 14 12月, 2014 13 次提交
  11. 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
  12. 06 12月, 2014 1 次提交
  13. 04 12月, 2014 1 次提交
  14. 03 12月, 2014 1 次提交
  15. 27 11月, 2014 1 次提交
  16. 26 11月, 2014 1 次提交
    • A
      libs: stabilize iter module · a86f72d9
      Aaron Turon 提交于
      This is an initial pass at stabilizing the `iter` module. The module is
      fairly large, but is also pretty polished, so most of the stabilization
      leaves things as they are.
      
      Some changes:
      
      * Due to the new object safety rules, various traits needs to be split
        into object-safe traits and extension traits. This includes `Iterator`
        itself. While splitting up the traits adds some complexity, it will
        also increase flexbility: once we have automatic impls of `Trait` for
        trait objects over `Trait`, then things like the iterator adapters
        will all work with trait objects.
      
      * Iterator adapters that use up the entire iterator now take it by
        value, which makes the semantics more clear and helps catch bugs. Due
        to the splitting of Iterator, this does not affect trait objects. If
        the underlying iterator is still desired for some reason, `by_ref` can
        be used. (Note: this change had no fallout in the Rust distro except
        for the useless mut lint.)
      
      * In general, extension traits new and old are following an [in-progress
        convention](https://github.com/rust-lang/rfcs/pull/445). As such, they
        are marked `unstable`.
      
      * As usual, anything involving closures is `unstable` pending unboxed
        closures.
      
      * A few of the more esoteric/underdeveloped iterator forms (like
        `RandomAccessIterator` and `MutableDoubleEndedIterator`, along with
        various unfolds) are left experimental for now.
      
      * The `order` submodule is left `experimental` because it will hopefully
        be replaced by generalized comparison traits.
      
      * "Leaf" iterators (like `Repeat` and `Counter`) are uniformly
        constructed by free fns at the module level. That's because the types
        are not otherwise of any significance (if we had `impl Trait`, you
        wouldn't want to define a type at all).
      
      Closes #17701
      
      Due to renamings and splitting of traits, this is a:
      
      [breaking-change]
      a86f72d9
  17. 21 11月, 2014 1 次提交
  18. 18 11月, 2014 1 次提交
  19. 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
  20. 14 11月, 2014 1 次提交
  21. 13 11月, 2014 1 次提交
  22. 12 11月, 2014 3 次提交
  23. 08 11月, 2014 1 次提交
    • G
      Renamed Extendable to Extend · 16c8cd93
      gamazeps 提交于
      In order to upgrade, simply rename the Extendable trait to Extend in
      your code
      
      Part of #18424
      
      [breaking-change]
      16c8cd93