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

Stabilize std::borrow #22210

Closed
wants to merge 10 commits into from
Closed

Stabilize std::borrow #22210

wants to merge 10 commits into from

Commits on Feb 18, 2015

  1. Configuration menu
    Copy the full SHA
    df92fe3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    92d65ab View commit details
    Browse the repository at this point in the history
  3. Replace assert_no_late_bound_regions with

    `no_late_bound_regions().unwrap()`, which allows us to write code that
    doesn't necessarily *fail* when there are higher-ranked trait bounds.
    nikomatsakis committed Feb 18, 2015
    Configuration menu
    Copy the full SHA
    48c70d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e84a719 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7134ad4 View commit details
    Browse the repository at this point in the history
  6. traits: break apart the "full normalization" code used for normalizing

    parameter environments so that it can be used elsewhere.
    nikomatsakis committed Feb 18, 2015
    Configuration menu
    Copy the full SHA
    5511add View commit details
    Browse the repository at this point in the history
  7. Extend the implicator so it produces general obligations and also so

    that it produces "outlives" relations for associated types. Add
    several tests relating to rust-lang#22246.
    nikomatsakis committed Feb 18, 2015
    Configuration menu
    Copy the full SHA
    2939e48 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a994a99 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9bb3b37 View commit details
    Browse the repository at this point in the history
  10. Stabilize std::borrow

    This commit stabilizes `std::borrow`, making the following modifications
    to catch up the API with language changes:
    
    * It renames `BorrowFrom` to `Borrow`, as was originally intended (but
      blocked for technical reasons), and reorders the parameters
      accordingly.
    
    * It moves the type parameter of `ToOwned` to an associated type. This
      is somewhat less flexible, in that each borrowed type must have a
      unique owned type, but leads to a significant simplification for
      `Cow`. Flexibility can be regained by using newtyped slices, which is
      advisable for other reasons anyway.
    
    * It removes the owned type parameter from `Cow`, making the type much
      less verbose.
    
    * Deprecates the `is_owned` and `is_borrowed` predicates in favor of
      direct matching.
    
    The above API changes are relatively minor; the basic functionality
    remains the same, and essentially the whole module is now marked
    `#[stable]`.
    
    [breaking-change]
    aturon committed Feb 18, 2015
    Configuration menu
    Copy the full SHA
    9b70775 View commit details
    Browse the repository at this point in the history