1. 08 5月, 2015 4 次提交
  2. 07 5月, 2015 1 次提交
  3. 06 5月, 2015 5 次提交
  4. 05 5月, 2015 4 次提交
  5. 04 5月, 2015 9 次提交
  6. 03 5月, 2015 3 次提交
  7. 02 5月, 2015 3 次提交
    • A
      std: Don't use a wrapper for the float error type · 12910418
      Alex Crichton 提交于
      Ensures that the same error type is propagated throughout. Unnecessary leakage
      of the internals is prevented through the usage of stability attributes.
      
      Closes #24748
      12910418
    • P
      Make `UnsafeCell`, `RefCell`, `Mutex`, and `RwLock` accept DSTs · 57d82897
      P1start 提交于
      This + DST coercions (#24619) would allow code like `Rc<RefCell<Box<Trait>>>` to
      be simplified to `Rc<RefCell<Trait>>`.
      57d82897
    • A
      std: Remove index notation on slice iterators · b1976f1f
      Alex Crichton 提交于
      These implementations were intended to be unstable, but currently the stability
      attributes cannot handle a stable trait with an unstable `impl` block. This
      commit also audits the rest of the standard library for explicitly-`#[unstable]`
      impl blocks. No others were removed but some annotations were changed to
      `#[stable]` as they're defacto stable anyway.
      
      One particularly interesting `impl` marked `#[stable]` as part of this commit
      is the `Add<&[T]>` impl for `Vec<T>`, which uses `push_all` and implicitly
      clones all elements of the vector provided.
      
      Closes #24791
      b1976f1f
  8. 01 5月, 2015 7 次提交
    • C
      Replaces instanced of 'an UTF' with 'a UTF' · 554da457
      Corey Farwell 提交于
      Even spelled out, one would say 'a Universal Character Set'
      554da457
    • A
      Add downcasting to std::error::Error · a5762625
      Aaron Turon 提交于
      This commit brings the `Error` trait in line with the [Error interoperation
      RFC](https://github.com/rust-lang/rfcs/pull/201) by adding downcasting,
      which has long been intended. This change means that for any `Error`
      trait objects that are `'static`, you can downcast to concrete error
      types.
      
      To make this work, it is necessary for `Error` to inherit from
      `Reflect` (which is currently used to mark concrete types as "permitted
      for reflection, aka downcasting"). This is a breaking change: it means
      that impls like
      
      ```rust
      impl<T> Error for MyErrorType<T> { ... }
      ```
      
      must change to something like
      
      ```rust
      impl<T: Reflect> Error for MyErrorType<T> { ... }
      ```
      
      except that `Reflect` is currently unstable (and should remain so for
      the time being). For now, code can instead bound by `Any`:
      
      ```rust
      impl<T: Any> Error for MyErrorType<T> { ... }
      ```
      
      which *is* stable and has `Reflect` as a super trait. The downside is
      that this imposes a `'static` constraint, but that only
      constrains *when* `Error` is implemented -- it does not actually
      constrain the types that can implement `Error`.
      
      [breaking-change]
      a5762625
    • B
      doc: current_dir returns a PathBuf, not a Path · d69cf294
      Brian Anderson 提交于
      d69cf294
    • A
      std: Always check for EDEADLK in rwlocks on unix · 5c8ca26a
      Alex Crichton 提交于
      Apparently implementations are allowed to return EDEADLK instead of blocking
      forever, in which case this can lead to unsafety in the `RwLock` primitive
      exposed by the standard library. A debug-build of the standard library would
      have caught this error (due to the debug assert), but we don't ship debug
      builds right now.
      
      This commit adds explicit checks for the EDEADLK error code and triggers a panic
      to ensure the call does not succeed.
      
      Closes #25012
      5c8ca26a
    • A
      std: Favor cfg! over #[cfg] in unix rwlocks · 4288a08e
      Alex Crichton 提交于
      4288a08e
    • C
      Remove unnecessary 'mut' qualifier on doc-comment var · ded5781c
      Corey Farwell 提交于
      The variable doesn't need to be mutable.
      ded5781c
    • A
      std: Destabilize io::BufStream · db477eef
      Alex Crichton 提交于
      As pointed out in #17136 the semantics of a `BufStream` aren't always what one
      expects, and it looks like other [languages like C#][c-sharp] implement a
      buffered stream with only one underlying buffer. For now this commit
      destabilizes the primitive in the `std::io` module to give us some more time in
      figuring out what to do with it.
      
      [c-sharp]: https://msdn.microsoft.com/en-us/library/system.io.bufferedstream%28v=vs.110%29.aspx
      
      [breaking-change]
      db477eef
  9. 30 4月, 2015 4 次提交