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

[beta] Final round of beta backports #44062

Merged
merged 9 commits into from
Aug 23, 2017
Merged

Commits on Aug 23, 2017

  1. make for_all_relevant_impls O(1) again

    A change in rust-lang#41911 had made `for_all_relevant_impls` do a linear scan over
    all impls, instead of using an HashMap. Use an HashMap again to avoid
    quadratic blowup when there is a large number of structs with impls.
    
    I think this fixes rust-lang#43141 completely, but I want better measurements in
    order to be sure. As a perf patch, please don't roll this up.
    arielb1 authored and alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    b2b8cba View commit details
    Browse the repository at this point in the history
  2. std: Respect formatting flags for str-like OsStr

    Historically many `Display` and `Debug` implementations for `OsStr`-like
    abstractions have gone through `String::from_utf8_lossy`, but this was updated
    in rust-lang#42613 to use an internal `Utf8Lossy` abstraction instead. This had the
    unfortunate side effect of causing a regression (rust-lang#43765) in code which relied on
    these `fmt` trait implementations respecting the various formatting flags
    specified.
    
    This commit opportunistically adds back interpretation of formatting trait flags
    in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can
    delegate to the formatting implementation for `str`. This doesn't entirely solve
    the regression as non-utf8 paths will format differently than they did before
    still (in that they will not respect formatting flags), but this should solve
    the regression for all "real world" use cases of paths and such. The door's also
    still open for handling these flags in the future!
    
    Closes rust-lang#43765
    alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    f0cd695 View commit details
    Browse the repository at this point in the history
  3. ast_validation: forbid "nonstandard" literal patterns

    Since rust-lang#42886, macros can create "nonstandard" PatKind::Lit patterns,
    that contain path expressions instead of the usual literal expr. These
    can cause trouble, including ICEs.
    
    We *could* map these nonstandard patterns to PatKind::Path patterns
    during HIR lowering, but that would be much effort for little gain, and
    I think is too risky for beta. So let's just forbid them during AST
    validation.
    
    Fixes rust-lang#43250.
    arielb1 authored and alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    5bb0cac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd20a03 View commit details
    Browse the repository at this point in the history
  5. fix other cases of registering obligations in a snapshot

    No test cases for these ones, but they would all ICE if they ever run
    with a non-empty set of obligations.
    arielb1 authored and alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    4b6a821 View commit details
    Browse the repository at this point in the history
  6. std: Mark allocation functions as nounwind

    This commit flags all allocation-related functions in liballoc as "this can't
    unwind" which should largely resolve the size-related issues found on rust-lang#42808.
    The documentation on the trait was updated with such a restriction (they can't
    panic) as well as some other words about the relative instability about
    implementing a bullet-proof allocator.
    
    Closes rust-lang#42808
    alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    76a1144 View commit details
    Browse the repository at this point in the history
  7. Bump to beta .3

    alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    c5beaac View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7c076fc View commit details
    Browse the repository at this point in the history
  9. Fix tests and fallout

    alexcrichton committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    0e9969c View commit details
    Browse the repository at this point in the history