1. 18 11月, 2014 1 次提交
  2. 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
  3. 14 11月, 2014 1 次提交
  4. 13 11月, 2014 1 次提交
  5. 12 11月, 2014 3 次提交
  6. 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
  7. 31 10月, 2014 1 次提交
  8. 20 10月, 2014 1 次提交
    • A
      Remove a large amount of deprecated functionality · 9d5d97b5
      Alex Crichton 提交于
      Spring cleaning is here! In the Fall! This commit removes quite a large amount
      of deprecated functionality from the standard libraries. I tried to ensure that
      only old deprecated functionality was removed.
      
      This is removing lots and lots of deprecated features, so this is a breaking
      change. Please consult the deprecation messages of the deleted code to see how
      to migrate code forward if it still needs migration.
      
      [breaking-change]
      9d5d97b5
  9. 14 10月, 2014 1 次提交
  10. 26 9月, 2014 1 次提交
    • S
      Fix Iterator::fuse example · a4844a65
      Steven Fackler 提交于
      The for loop would *always* exaust the iterator previously, which seems
      like behavior that was not intended. It's still kind of a weird
      function.
      a4844a65
  11. 24 9月, 2014 1 次提交
    • C
      Fix iterator doc · e87209ec
      Corey Ford 提交于
      OrdIterator: the doc says that values must implement `PartialOrd`, while the implementation is only for `Ord` values. It looks like this initially got out of sync in 4e1c2158. Removed the doc sentence entirely since it seems redundant.
      
      MultiplicativeIterator: Fixed weird sentence.
      e87209ec
  12. 23 9月, 2014 1 次提交
    • P
      librustc: Forbid private types in public APIs. · e9ad12c0
      Patrick Walton 提交于
      This breaks code like:
      
          struct Foo {
              ...
          }
      
          pub fn make_foo() -> Foo {
              ...
          }
      
      Change this code to:
      
          pub struct Foo {    // note `pub`
              ...
          }
      
          pub fn make_foo() -> Foo {
              ...
          }
      
      The `visible_private_types` lint has been removed, since it is now an
      error to attempt to expose a private type in a public API. In its place
      a `#[feature(visible_private_types)]` gate has been added.
      
      Closes #16463.
      
      RFC #48.
      
      [breaking-change]
      e9ad12c0
  13. 17 9月, 2014 1 次提交
  14. 14 9月, 2014 1 次提交
    • S
      Remove container guide. · 1b818020
      Steve Klabnik 提交于
      This isn't really what guides are for, this information belongs in the
      module-level docs.
      
      Fixes #9314.
      1b818020
  15. 08 9月, 2014 1 次提交
  16. 30 8月, 2014 1 次提交
  17. 29 8月, 2014 1 次提交
  18. 28 8月, 2014 1 次提交
  19. 24 8月, 2014 1 次提交
    • R
      libcore: Simplify Enumerate, Zip::next_back · d3637708
      root 提交于
      Use ExactSize::len() and defer to its decisions about overly defensive
      assertions. Remove the length double-check and simply put a failure
      case if the Zip finds an uneven end in .next_back().
      
      Fixing this up since I think I wrote this, and it's been known to
      confuse rusties (PR#15886).
      d3637708
  20. 06 8月, 2014 1 次提交
    • P
      core: Refactor iterators · a55149b8
      Piotr Czarnecki 提交于
      Simplifying the code of methods: nth, fold, rposition
      and iterators: Filter, FilterMap, SkipWhile
      Adding basic benchmarks
      a55149b8
  21. 25 7月, 2014 1 次提交
    • P
      librustc: Stop desugaring `for` expressions and translate them directly. · caa564be
      Patrick Walton 提交于
      This makes edge cases in which the `Iterator` trait was not in scope
      and/or `Option` or its variants were not in scope work properly.
      
      This breaks code that looks like:
      
          struct MyStruct { ... }
      
          impl MyStruct {
              fn next(&mut self) -> Option<int> { ... }
          }
      
          for x in MyStruct { ... } { ... }
      
      Change ad-hoc `next` methods like the above to implementations of the
      `Iterator` trait. For example:
      
          impl Iterator<int> for MyStruct {
              fn next(&mut self) -> Option<int> { ... }
          }
      
      Closes #15392.
      
      [breaking-change]
      caa564be
  22. 23 7月, 2014 1 次提交
  23. 22 7月, 2014 1 次提交
  24. 13 7月, 2014 1 次提交
    • J
      Add an iterate function to core::iter · ed54162e
      Jakub Wieczorek 提交于
      Implementation by Kevin Ballard.
      
      The function returns an Unfold iterator producing an infinite stream
      of results of repeated applications of the function, starting from
      the provided seed value.
      ed54162e
  25. 10 7月, 2014 2 次提交
    • L
      libcore: Deprecate advance method on Iterators. · 1eb4ce02
      Luqman Aden 提交于
      1eb4ce02
    • H
      core: add `#[must_use]` attributes to iterator adaptor structs. · 27d18fbe
      Huon Wilson 提交于
      It can be a little unintuitive that something like `v.iter().map(|x|
      println!("{}", x));` does nothing: the majority of the iterator adaptors
      are lazy and do not execute anything until something calls `next`, e.g.
      a `for` loop, `collect`, `fold`, etc.
      
      The majority of such errors can be seen by someone writing something
      like the above, i.e. just calling an iterator adaptor and doing nothing
      with it (and doing this is certainly useless), so we can co-opt the
      `must_use` lint, using the message functionality to give a hint to the
      reason why.
      
      Fixes #14666.
      27d18fbe
  26. 30 6月, 2014 3 次提交
    • S
      Implement RFC#28: Add PartialOrd::partial_cmp · 55cae0a0
      Steven Fackler 提交于
      I ended up altering the semantics of Json's PartialOrd implementation.
      It used to be the case that Null < Null, but I can't think of any reason
      for an ordering other than the default one so I just switched it over to
      using the derived implementation.
      
      This also fixes broken `PartialOrd` implementations for `Vec` and
      `TreeMap`.
      
      RFC: 0028-partial-cmp
      55cae0a0
    • S
      Extract tests from libcore to a separate crate · 1ed646ea
      Steven Fackler 提交于
      Libcore's test infrastructure is complicated by the fact that many lang
      items are defined in the crate. The current approach (realcore/realstd
      imports) is hacky and hard to work with (tests inside of core::cmp
      haven't been run for months!).
      
      Moving tests to a separate crate does mean that they can only test the
      public API of libcore, but I don't feel that that is too much of an
      issue. The only tests that I had to get rid of were some checking the
      various numeric formatters, but those are also exercised through normal
      format! calls in other tests.
      1ed646ea
    • P
      librustc: Remove the fallback to `int` for integers and `f64` for · a5bb0a3a
      Patrick Walton 提交于
      floating point numbers for real.
      
      This will break code that looks like:
      
          let mut x = 0;
          while ... {
              x += 1;
          }
          println!("{}", x);
      
      Change that code to:
      
          let mut x = 0i;
          while ... {
              x += 1;
          }
          println!("{}", x);
      
      Closes #15201.
      
      [breaking-change]
      a5bb0a3a
  27. 29 6月, 2014 1 次提交
    • P
      librustc: Match trait self types exactly. · 05e3248a
      Patrick Walton 提交于
      This can break code that looked like:
      
          impl Foo for Box<Any> {
              fn f(&self) { ... }
          }
      
          let x: Box<Any + Send> = ...;
          x.f();
      
      Change such code to:
      
          impl Foo for Box<Any> {
              fn f(&self) { ... }
          }
      
          let x: Box<Any> = ...;
          x.f();
      
      That is, upcast before calling methods.
      
      This is a conservative solution to #5781. A more proper treatment (see
      the xfail'd `trait-contravariant-self.rs`) would take variance into
      account. This change fixes the soundness hole.
      
      Some library changes had to be made to make this work. In particular,
      `Box<Any>` is no longer showable, and only `Box<Any+Send>` is showable.
      Eventually, this restriction can be lifted; for now, it does not prove
      too onerous, because `Any` is only used for propagating the result of
      task failure.
      
      This patch also adds a test for the variance inference work in #12828,
      which accidentally landed as part of DST.
      
      Closes #5781.
      
      [breaking-change]
      05e3248a
  28. 25 6月, 2014 1 次提交
    • N
      librustc: Remove the fallback to `int` from typechecking. · 9e3d0b00
      Niko Matsakis 提交于
      This breaks a fair amount of code. The typical patterns are:
      
      * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`;
      
      * `println!("{}", 3)`: change to `println!("{}", 3i)`;
      
      * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`.
      
      RFC #30. Closes #6023.
      
      [breaking-change]
      9e3d0b00
  29. 15 6月, 2014 1 次提交
    • A
      rustc: Obsolete the `@` syntax entirely · ade807c6
      Alex Crichton 提交于
      This removes all remnants of `@` pointers from rustc. Additionally, this removes
      the `GC` structure from the prelude as it seems odd exporting an experimental
      type in the prelude by default.
      
      Closes #14193
      [breaking-change]
      ade807c6
  30. 12 6月, 2014 1 次提交
    • A
      rustc: Remove ~[T] from the language · 3316b1eb
      Alex Crichton 提交于
      The following features have been removed
      
      * box [a, b, c]
      * ~[a, b, c]
      * box [a, ..N]
      * ~[a, ..N]
      * ~[T] (as a type)
      * deprecated_owned_vector lint
      
      All users of ~[T] should move to using Vec<T> instead.
      3316b1eb
  31. 07 6月, 2014 1 次提交
    • A
      Rename Iterator::len to count · 1bde6e3f
      Aaron Turon 提交于
      This commit carries out the request from issue #14678:
      
      > The method `Iterator::len()` is surprising, as all the other uses of
      > `len()` do not consume the value. `len()` would make more sense to be
      > called `count()`, but that would collide with the current
      > `Iterator::count(|T| -> bool) -> unit` method. That method, however, is
      > a bit redundant, and can be easily replaced with
      > `iter.filter(|x| x < 5).count()`.
      > After this change, we could then define the `len()` method
      > on `iter::ExactSize`.
      
      Closes #14678.
      
      [breaking-change]
      1bde6e3f
  32. 02 6月, 2014 1 次提交
    • A
      std: Drop Total from Total{Eq,Ord} · bba701c5
      Alex Crichton 提交于
      This completes the last stage of the renaming of the comparison hierarchy of
      traits. This change renames TotalEq to Eq and TotalOrd to Ord.
      
      In the future the new Eq/Ord will be filled out with their appropriate methods,
      but for now this change is purely a renaming change.
      
      [breaking-change]
      bba701c5
  33. 31 5月, 2014 2 次提交
    • A
      syntax: Prepare for Total{Eq,Ord} => {Eq,Ord} · bb96ee61
      Alex Crichton 提交于
      This commit adds the groundwork for the renaming of the Total{Eq,Ord} traits.
      After this commit hits a snapshot, the traits can be renamed.
      bb96ee61
    • A
      std: Rename {Eq,Ord} to Partial{Eq,Ord} · 748bc3ca
      Alex Crichton 提交于
      This is part of the ongoing renaming of the equality traits. See #12517 for more
      details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord}
      or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}.
      
      cc #12517
      
      [breaking-change]
      748bc3ca
  34. 22 5月, 2014 1 次提交