1. 04 4月, 2015 1 次提交
  2. 02 4月, 2015 2 次提交
  3. 01 4月, 2015 2 次提交
    • A
      std: Clean out #[deprecated] APIs · d4a2c941
      Alex Crichton 提交于
      This commit cleans out a large amount of deprecated APIs from the standard
      library and some of the facade crates as well, updating all users in the
      compiler and in tests as it goes along.
      d4a2c941
    • A
      Stabilize `std::convert` and related code · 9fc51efe
      Aaron Turon 提交于
      * Marks `#[stable]` the contents of the `std::convert` module.
      
      * Added methods `PathBuf::as_path`, `OsString::as_os_str`,
        `String::as_str`, `Vec::{as_slice, as_mut_slice}`.
      
      * Deprecates `OsStr::from_str` in favor of a new, stable, and more
        general `OsStr::new`.
      
      * Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
        to_cstring}` for ergonomic FFI usage.
      
      [breaking-change]
      9fc51efe
  4. 31 3月, 2015 1 次提交
  5. 29 3月, 2015 2 次提交
    • S
      Fix massive performance issue in read_to_end · ccb4e842
      Steven Fackler 提交于
      with_end_to_cap is enormously expensive now that it's initializing
      memory since it involves 64k allocation + memset on every call. This is
      most noticable when calling read_to_end on very small readers, where the
      new version if **4 orders of magnitude** faster.
      
      BufReader also depended on with_end_to_cap so I've rewritten it in its
      original form.
      
      As a bonus, converted the buffered IO struct Debug impls to use the
      debug builders.
      
      Fixes #23815
      ccb4e842
    • S
      Update debug helpers and add list builder · 4037f2a3
      Steven Fackler 提交于
      The collections debug helpers no longer prefix output with the
      collection name, in line with the current conventions for Debug
      implementations. Implementations that want to preserve the current
      behavior can simply add a `try!(write!(fmt, "TypeName "));` at the
      beginning of the `fmt` method.
      
      [breaking-change]
      4037f2a3
  6. 28 3月, 2015 3 次提交
    • A
      std: Don't deadlock/panic on recursive prints · e2fd2dff
      Alex Crichton 提交于
      Previously a panic was generated for recursive prints due to a double-borrow of
      a `RefCell`. This was solved by the second borrow's output being directed
      towards the global stdout instead of the per-thread stdout (still experimental
      functionality).
      
      After this functionality was altered, however, recursive prints still deadlocked
      due to the overridden `write_fmt` method which locked itself first and then
      wrote all the data. This was fixed by removing the override of the `write_fmt`
      method. This means that unlocked usage of `write!` on a `Stdout`/`Stderr` may be
      slower due to acquiring more locks, but it's easy to make more performant with a
      call to `.lock()`.
      
      Closes #23781
      e2fd2dff
    • B
      Feature gate *all* slice patterns. #23121 · 1639e51f
      Brian Anderson 提交于
      Until some backwards-compatibility hazards are fixed in #23121,
      these need to be unstable.
      
      [breaking-change]
      1639e51f
    • R
      Unquote all crate names without underscores · 13e4270b
      Richo Healey 提交于
      13e4270b
  7. 27 3月, 2015 5 次提交
    • N
      Change the trivial cast lints to allow by default · a67faf1b
      Nick Cameron 提交于
      a67faf1b
    • G
      Update docs to fix various 404s · 5123bf40
      Gary M. Josack 提交于
      Found a few 404s that seemed like simple fixes:
      
      The Result docs use old_io Writer as an example. Fix the link to old_io Writer. There's probably an effort to update the example away from a deprecated api but this was a simple fix.
      
      rustc/plugin was pointing at the old guide and it was a broken link anyways (plugin vs plugins). Point at the book instead.
      
      The main page of the API docs referenced c_{str,vec}. Looks like these were deleted in 25d5a3a1. Point at ffi docs instead.
      5123bf40
    • A
      rustc: Remove support for old_impl_check · 9754b06c
      Alex Crichton 提交于
      This commit removes compiler support for the `old_impl_check` attribute which
      should in theory be entirely removed now. The last remaining use of it in the
      standard library has been updated by moving the type parameter on the
      `old_io::Acceptor` trait into an associated type. As a result, this is a
      breaking change for all current users of the deprecated `old_io::Acceptor`
      trait. Code can be migrated by using the `Connection` associated type instead.
      
      [breaking-change]
      9754b06c
    • A
      Mass rename uint/int to usize/isize · 43bfaa4a
      Alex Crichton 提交于
      Now that support has been removed, all lingering use cases are renamed.
      43bfaa4a
    • A
      Register new snapshots · 36ef29ab
      Alex Crichton 提交于
      36ef29ab
  8. 26 3月, 2015 1 次提交
  9. 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
  10. 24 3月, 2015 7 次提交
  11. 23 3月, 2015 1 次提交
  12. 18 3月, 2015 1 次提交
    • A
      std: Tweak some unstable features of `str` · aa88da63
      Alex Crichton 提交于
      This commit clarifies some of the unstable features in the `str` module by
      moving them out of the blanket `core` and `collections` features.
      
      The following methods were moved to the `str_char` feature which generally
      encompasses decoding specific characters from a `str` and dealing with the
      result. It is unclear if any of these methods need to be stabilized for 1.0 and
      the most conservative route for now is to continue providing them but to leave
      them as unstable under a more specific name.
      
      * `is_char_boundary`
      * `char_at`
      * `char_range_at`
      * `char_at_reverse`
      * `char_range_at_reverse`
      * `slice_shift_char`
      
      The following methods were moved into the generic `unicode` feature as they are
      specifically enabled by the `unicode` crate itself.
      
      * `nfd_chars`
      * `nfkd_chars`
      * `nfc_chars`
      * `graphemes`
      * `grapheme_indices`
      * `width`
      aa88da63
  13. 15 3月, 2015 1 次提交
  14. 14 3月, 2015 1 次提交
  15. 13 3月, 2015 1 次提交
  16. 06 3月, 2015 1 次提交
  17. 05 3月, 2015 1 次提交
  18. 03 3月, 2015 1 次提交
  19. 01 3月, 2015 3 次提交
  20. 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
  21. 24 2月, 2015 1 次提交
  22. 21 2月, 2015 1 次提交