1. 07 11月, 2016 1 次提交
    • D
      Add a comment to `Arc::MAX_REFCOUNT` · 99aaccd3
      Daan Sprenkels 提交于
      The constant name `MAX_REFCOUNT` suggests that the value is a
      _hard_ limit on the amount of references to an `Arc`. This is
      a more soft limit however. This commit adds a comment to the
      constant to annotate this.
      
      See also: PR #37605
      99aaccd3
  2. 05 11月, 2016 1 次提交
  3. 04 10月, 2016 1 次提交
  4. 01 10月, 2016 1 次提交
  5. 29 9月, 2016 1 次提交
  6. 16 9月, 2016 1 次提交
  7. 12 9月, 2016 1 次提交
  8. 11 9月, 2016 1 次提交
  9. 28 8月, 2016 1 次提交
  10. 24 8月, 2016 1 次提交
  11. 23 7月, 2016 1 次提交
    • A
      std: Ignore tests where threads outlive main · 84876662
      Alex Crichton 提交于
      Long ago we discovered that threads which outlive main and then exit while the
      rest of the program is exiting causes Windows to hang (#20704). That's what was
      happening in this test so let's just not run this test any more.
      84876662
  12. 12 7月, 2016 1 次提交
  13. 28 5月, 2016 1 次提交
  14. 25 5月, 2016 1 次提交
    • A
      std: Stabilize APIs for the 1.10 release · cae91d7c
      Alex Crichton 提交于
      This commit applies the FCP decisions made by the libs team for the 1.10 cycle,
      including both new stabilizations and deprecations. Specifically, the list of
      APIs is:
      
      Stabilized:
      
      * `os::windows::fs::OpenOptionsExt::access_mode`
      * `os::windows::fs::OpenOptionsExt::share_mode`
      * `os::windows::fs::OpenOptionsExt::custom_flags`
      * `os::windows::fs::OpenOptionsExt::attributes`
      * `os::windows::fs::OpenOptionsExt::security_qos_flags`
      * `os::unix::fs::OpenOptionsExt::custom_flags`
      * `sync::Weak::new`
      * `Default for sync::Weak`
      * `panic::set_hook`
      * `panic::take_hook`
      * `panic::PanicInfo`
      * `panic::PanicInfo::payload`
      * `panic::PanicInfo::location`
      * `panic::Location`
      * `panic::Location::file`
      * `panic::Location::line`
      * `ffi::CStr::from_bytes_with_nul`
      * `ffi::CStr::from_bytes_with_nul_unchecked`
      * `ffi::FromBytesWithNulError`
      * `fs::Metadata::modified`
      * `fs::Metadata::accessed`
      * `fs::Metadata::created`
      * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
      * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
      * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
      * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
      * `SocketAddr::is_unnamed`
      * `SocketAddr::as_pathname`
      * `UnixStream::connect`
      * `UnixStream::pair`
      * `UnixStream::try_clone`
      * `UnixStream::local_addr`
      * `UnixStream::peer_addr`
      * `UnixStream::set_read_timeout`
      * `UnixStream::set_write_timeout`
      * `UnixStream::read_timeout`
      * `UnixStream::write_Timeout`
      * `UnixStream::set_nonblocking`
      * `UnixStream::take_error`
      * `UnixStream::shutdown`
      * Read/Write/RawFd impls for `UnixStream`
      * `UnixListener::bind`
      * `UnixListener::accept`
      * `UnixListener::try_clone`
      * `UnixListener::local_addr`
      * `UnixListener::set_nonblocking`
      * `UnixListener::take_error`
      * `UnixListener::incoming`
      * RawFd impls for `UnixListener`
      * `UnixDatagram::bind`
      * `UnixDatagram::unbound`
      * `UnixDatagram::pair`
      * `UnixDatagram::connect`
      * `UnixDatagram::try_clone`
      * `UnixDatagram::local_addr`
      * `UnixDatagram::peer_addr`
      * `UnixDatagram::recv_from`
      * `UnixDatagram::recv`
      * `UnixDatagram::send_to`
      * `UnixDatagram::send`
      * `UnixDatagram::set_read_timeout`
      * `UnixDatagram::set_write_timeout`
      * `UnixDatagram::read_timeout`
      * `UnixDatagram::write_timeout`
      * `UnixDatagram::set_nonblocking`
      * `UnixDatagram::take_error`
      * `UnixDatagram::shutdown`
      * RawFd impls for `UnixDatagram`
      * `{BTree,Hash}Map::values_mut`
      * `<[_]>::binary_search_by_key`
      
      Deprecated:
      
      * `StaticCondvar` - this, and all other static synchronization primitives
                          below, are usable today through the lazy-static crate on
                          stable Rust today. Additionally, we'd like the non-static
                          versions to be directly usable in a static context one day,
                          so they're unlikely to be the final forms of the APIs in any
                          case.
      * `CONDVAR_INIT`
      * `StaticMutex`
      * `MUTEX_INIT`
      * `StaticRwLock`
      * `RWLOCK_INIT`
      * `iter::Peekable::is_empty`
      
      Closes #27717
      Closes #27720
      cc #27784 (but encode methods still exist)
      Closes #30014
      Closes #30425
      Closes #30449
      Closes #31190
      Closes #31399
      Closes #31767
      Closes #32111
      Closes #32281
      Closes #32312
      Closes #32551
      Closes #33018
      cae91d7c
  15. 05 4月, 2016 2 次提交
  16. 31 3月, 2016 1 次提交
  17. 11 3月, 2016 1 次提交
  18. 09 3月, 2016 1 次提交
  19. 09 2月, 2016 1 次提交
    • K
      Implement fmt::Pointer for pointers to unsized types · c5f73ed8
      Kamal Marhubi 提交于
      This allows printing pointers to unsized types with the {:p} formatting
      directive. The following impls are extended to unsized types:
       - impl<'a, T: ?Sized> Pointer for &'a T
       - impl<'a, T: ?Sized> Pointer for &'a mut T
       - impl<T: ?Sized> Pointer for *const T
       - impl<T: ?Sized> Pointer for *mut T
       - impl<T: ?Sized> fmt::Pointer for Box<T>
       - impl<T: ?Sized> fmt::Pointer for Rc<T>
       - impl<T: ?Sized> fmt::Pointer for Arc<T>
      c5f73ed8
  20. 04 2月, 2016 1 次提交
    • R
      Fix unclear make_mut docs · 3cafce65
      Richard Bradfield 提交于
      Changed the description of the `make_mut` copy-on-write behaviour in arc.rs
      
      The sentence "doesn't have one strong reference and no weak references." is a
      hard to understand double negative, which can be much more easily explained.
      3cafce65
  21. 20 1月, 2016 1 次提交
  22. 31 12月, 2015 1 次提交
    • S
      Small refactoring to make this code more clear · 2cff12e0
      Steve Klabnik 提交于
      This hairy conditional doesn't need to be so. It _does_ need to be a
      thin pointer, otherwise, it will fail to compile, so let's pull that out
      into a temporary for future readers of the source.
      
      Also, after a discussion with @pnkfelix and @gankro, we don't need these
      null checks anymore, as zero-on-drop has been gone for a while now.
      2cff12e0
  23. 22 12月, 2015 1 次提交
  24. 19 12月, 2015 3 次提交
  25. 11 12月, 2015 1 次提交
  26. 09 12月, 2015 1 次提交
  27. 25 11月, 2015 1 次提交
  28. 24 11月, 2015 1 次提交
  29. 20 11月, 2015 1 次提交
  30. 18 11月, 2015 1 次提交
  31. 16 11月, 2015 1 次提交
  32. 12 11月, 2015 2 次提交
  33. 06 11月, 2015 1 次提交
  34. 04 11月, 2015 1 次提交
    • A
      liballoc: implement From for Box, Rc, Arc · fcc79f2d
      Alexander Bulaev 提交于
      Sometimes when writing generic code you want to abstract over
      owning/pointer type so that calling code isn't restricted by one
      concrete owning/pointer type. This commit makes possible such code:
      ```
      fn i_will_work_with_arc<T: Into<Arc<MyTy>>>(t: T) {
          let the_arc = t.into();
          // Do something
      }
      
      i_will_work_with_arc(MyTy::new());
      
      i_will_work_with_arc(Box::new(MyTy::new()));
      
      let arc_that_i_already_have = Arc::new(MyTy::new());
      i_will_work_with_arc(arc_that_i_already_have);
      ```
      
      Please note that this patch doesn't work with DSTs.
      fcc79f2d
  35. 30 10月, 2015 1 次提交
  36. 17 10月, 2015 1 次提交
    • A
      Add `Shared` pointer and have `{Arc, Rc}` use it · d6bd8d84
      Andrew Paseltiner 提交于
      This change has two consequences:
      
      1. It makes `Arc<T>` and `Rc<T>` covariant in `T`.
      
      2. It causes the compiler to reject code that was unsound with respect
      to dropck. See compile-fail/issue-29106.rs for an example of code that
      no longer compiles. Because of this, this is a [breaking-change].
      
      Fixes #29037.
      Fixes #29106.
      d6bd8d84