Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement RFC 458: improve Send #22319

Merged
merged 6 commits into from
Feb 18, 2015
Merged

Commits on Feb 17, 2015

  1. Remove the implicit 'static bound on Send.

    Previously Send was defined as `trait Send: 'static {}`. As detailed in
    rust-lang/rfcs#458, the `'static` bound is not
    actually necessary for safety, we can use lifetimes to enforce that more
    flexibly.
    
    `unsafe` code that was previously relying on `Send` to insert a
    `'static` bound now may allow incorrect patterns, and so should be
    audited (a quick way to ensure safety immediately and postpone the audit
    is to add an explicit `'static` bound to any uses of the `Send` type).
    
    cc rust-lang#22251.
    huonw committed Feb 17, 2015
    Configuration menu
    Copy the full SHA
    cae969e View commit details
    Browse the repository at this point in the history
  2. Update the libraries to reflect Send loosing the 'static bound.

    In most places this preserves the current API by adding an explicit
    `'static` bound.
    
    Notably absent are some impls like `unsafe impl<T: Send> Send for
    Foo<T>` and the `std::thread` module. It is likely that it will be
    possible to remove these after auditing the code to ensure restricted
    lifetimes are safe.
    
    More progress on rust-lang#22251.
    huonw committed Feb 17, 2015
    Configuration menu
    Copy the full SHA
    d7b5bc3 View commit details
    Browse the repository at this point in the history
  3. Add Send implementations for & and &mut.

    Per RFC 458.
    
    Closes rust-lang#22251.
    huonw committed Feb 17, 2015
    Configuration menu
    Copy the full SHA
    35ca50b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    22c8832 View commit details
    Browse the repository at this point in the history
  5. Add missing marker to std::thread::JoinGuard.

    The lifetime was previously, incorrectly unconstrained.
    huonw committed Feb 17, 2015
    Configuration menu
    Copy the full SHA
    adfcd93 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2015

  1. Configuration menu
    Copy the full SHA
    7a14f49 View commit details
    Browse the repository at this point in the history