1. 08 5月, 2015 1 次提交
  2. 14 4月, 2015 1 次提交
  3. 01 4月, 2015 1 次提交
  4. 31 3月, 2015 1 次提交
    • A
      std: Standardize (input, output) param orderings · acd48a2b
      Alex Crichton 提交于
      This functions swaps the order of arguments to a few functions that previously
      took (output, input) parameters, but now take (input, output) parameters (in
      that order).
      
      The affected functions are:
      
      * ptr::copy
      * ptr::copy_nonoverlapping
      * slice::bytes::copy_memory
      * intrinsics::copy
      * intrinsics::copy_nonoverlapping
      
      Closes #22890
      [breaking-change]
      acd48a2b
  5. 26 3月, 2015 4 次提交
  6. 25 3月, 2015 2 次提交
    • N
      Change lint names to plurals · e7122a5a
      Nick Cameron 提交于
      e7122a5a
    • N
      Add trivial cast lints. · 95602a75
      Nick Cameron 提交于
      This permits all coercions to be performed in casts, but adds lints to warn in those cases.
      
      Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference.
      
      [breaking change]
      
      * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed.
      * The unused casts lint has gone.
      * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are:
      - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_`
      - Casts do not influence inference of integer types. E.g., the following used to type check:
      
      ```
      let x = 42;
      let y = &x as *const u32;
      ```
      
      Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information:
      
      ```
      let x: u32 = 42;
      let y = &x as *const u32;
      ```
      95602a75
  7. 14 3月, 2015 1 次提交
  8. 25 2月, 2015 1 次提交
    • A
      std: Stabilize some `ptr` functions · ab456941
      Alex Crichton 提交于
      Specifically, the following actions were taken:
      
      * The `copy_memory` and `copy_nonoverlapping_memory` functions
        to drop the `_memory` suffix (as it's implied by the functionality). Both
        functions are now marked as `#[stable]`.
      * The `set_memory` function was renamed to `write_bytes` and is now stable.
      * The `zero_memory` function is now deprecated in favor of `write_bytes`
        directly.
      * The `Unique` pointer type is now behind its own feature gate called `unique`
        to facilitate future stabilization.
      * All type parameters now are `T: ?Sized` wherever possible and new clauses were
        added to the `offset` functions to require that the type is sized.
      
      [breaking-change]
      ab456941
  9. 16 2月, 2015 1 次提交
  10. 06 2月, 2015 1 次提交
  11. 25 1月, 2015 1 次提交
  12. 24 1月, 2015 2 次提交
  13. 22 1月, 2015 2 次提交
  14. 07 1月, 2015 2 次提交
  15. 06 1月, 2015 3 次提交
  16. 17 12月, 2014 1 次提交
  17. 16 12月, 2014 1 次提交
    • A
      std: Second-pass stabilization of `mem` · 23bae856
      Alex Crichton 提交于
      This commit takes a second pass through the `std::mem` module for stabilization.
      The only remaining non-stable items in this module were `forget`, `transmute`,
      `copy_lifetime`, and `copy_lifetime_mut`.
      
      The `forget` and `transmute` intrinsics themselves were marked `#[stable]` to
      propgate into the `core::mem` module so they would be marked stable.
      
      The `copy_lifetime` functions were left `unstable`, but `Sized?` annotations
      were added to the parameters to allow more general use with DSTs.
      
      The `size_of_val`, `min_align_of_val`, and `align_of_val` functions would like
      to grow `Sized?` bounds, but this is a backwards compatible change that
      currently ICEs the compiler, so this change was not made at this time.
      
      Finally, the module itself was declared `#![stable]` in this pass.
      23bae856
  18. 17 11月, 2014 1 次提交
  19. 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
  20. 28 8月, 2014 1 次提交
  21. 26 8月, 2014 1 次提交
  22. 15 8月, 2014 1 次提交
  23. 30 6月, 2014 2 次提交
    • 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
  24. 29 6月, 2014 1 次提交
  25. 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
  26. 24 6月, 2014 1 次提交
  27. 19 6月, 2014 4 次提交