Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 51b0b3734
Choose a base ref
...
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e6072a7b3
Choose a head ref
  • 16 commits
  • 41 files changed
  • 6 contributors

Commits on Jan 7, 2018

  1. type error method suggestions use whitelisted identity-like conversions

    Previously, on a type mismatch (and if this wasn't preëmpted by a
    higher-priority suggestion), we would look for argumentless methods
    returning the expected type, and list them in a `help` note.
    
    This had two major shortcomings. Firstly, a lot of the suggestions didn't
    really make sense (if you used a &str where a String was expected,
    `.to_ascii_uppercase()` is probably not the solution you were hoping
    for). Secondly, we weren't generating suggestions from the most useful
    traits!
    
    We address the first problem with an internal
    `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep
    the "same value" in the relevant sense, just converting the type. We
    address the second problem by making `FnCtxt.probe_for_return_type` pass
    the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe
    because grep reveals no other callers of `probe_for_return_type`.
    
    Also, structured suggestions are preferred (because they're pretty, but
    also for RLS and friends).
    
    Also also, we make the E0055 autoderef recursion limit error use the
    one-time-diagnostics set, because we can potentially hit the limit a lot
    during probing. (Without this,
    test/ui/did_you_mean/recursion_limit_deref.rs would report "aborting due to
    51 errors").
    
    Unfortunately, the trait probing is still not all one would hope for: at a
    minimum, we don't know how to rule out `into()` in cases where it wouldn't
    actually work, and we don't know how to rule in `.to_owned()` where it
    would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME.
    
    This is hoped to resolve #42929, #44672, and #45777.
    zackmdavis committed Jan 7, 2018
    Copy the full SHA
    aba56dd View commit details
  2. Remove deprecated unstable attribute #[simd]

    The `#[simd]` attribute has been deprecated since c8b6d5b back in 2015. Any nightly crates using it have had ample time to switch to `#[repr(simd)]`, and if they didn't they're likely broken by now anyway.
    Robin Kruppe committed Jan 7, 2018
    Copy the full SHA
    95c3fc0 View commit details

Commits on Jan 8, 2018

  1. struct pattern parsing and diagnostic tweaks

     - Recover from struct parse error on match and point out missing match
       body.
     - Point at struct when finding non-identifier while parsing its fields.
     - Add label to "expected identifier, found {}" error.
    estebank committed Jan 8, 2018
    Copy the full SHA
    d17e38f View commit details
  2. Use different DefIndex representation that is better suited for varia…

    …ble length integer encodings.
    michaelwoerister committed Jan 8, 2018
    Copy the full SHA
    c9d25e3 View commit details

Commits on Jan 12, 2018

  1. Fix #45345.

    Re-implement
    
    ```bash
    CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
    ```
    
    from old `configure` script.
    o01eg committed Jan 12, 2018
    Copy the full SHA
    ee8b578 View commit details
  2. Accept verbosity in rustdoc.

    o01eg committed Jan 12, 2018
    Copy the full SHA
    27b4f22 View commit details
  3. Copy the full SHA
    0f5110e View commit details
  4. Copy the full SHA
    c87a108 View commit details
  5. Copy the full SHA
    f05282f View commit details
  6. Copy the full SHA
    83e76d6 View commit details
  7. Copy the full SHA
    472f4e1 View commit details

Commits on Jan 13, 2018

  1. Auto merge of #46461 - zackmdavis:elemental_method_suggestion_jambore…

    …e, r=estebank
    
     type error method suggestions use whitelisted identity-like conversions
    
    ![method_jamboree_summit](https://user-images.githubusercontent.com/1076988/33523646-e5c43184-d7c0-11e7-98e5-1bff426ade86.png)
    
    Previously, on a type mismatch (and if this wasn't preëmpted by a
    higher-priority suggestion), we would look for argumentless methods
    returning the expected type, and list them in a `help` note. This had two
    major shortcomings: firstly, a lot of the suggestions didn't really make
    sense (if you used a &str where a String was expected,
    `.to_ascii_uppercase()` is probably not the solution you were hoping
    for). Secondly, we weren't generating suggestions from the most useful
    traits! We address the first problem with an internal
    `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep
    the "same value" in the relevant sense, just converting the type. We
    address the second problem by making `FnCtxt.probe_for_return_type` pass
    the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe
    because grep reveals no other callers of `probe_for_return_type`.
    
    Also, structured suggestions are pretty and good for RLS and friends.
    
    Unfortunately, the trait probing is still not all one would hope for: at a
    minimum, we don't know how to rule out `into()` in cases where it wouldn't
    actually work, and we don't know how to rule in `.to_owned()` where it
    would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME.
    
    This is hoped to resolve #42929, #44672, and #45777.
    bors committed Jan 13, 2018
    Copy the full SHA
    6eff103 View commit details
  2. Auto merge of #46592 - o01eg:fix-45345, r=alexcrichton

    Fix 45345
    
    There is a fix for #45345
    
    It re-introduces `CFG_LIBDIR_RELATIVE` which was broken when migration from `configure` script to `x.py`.
    
    Other commits fix errors which happen after rustbuild cleanups.
    bors committed Jan 13, 2018
    Copy the full SHA
    6cf081c View commit details
  3. Auto merge of #47181 - michaelwoerister:var-len-def-index, r=eddyb

    Use DefIndex encoding that works better with on-disk variable length integer representations.
    
    Use the least instead of the most significant bit for representing the address space.
    
    r? @eddyb
    bors committed Jan 13, 2018
    Copy the full SHA
    ca09293 View commit details
  4. Auto merge of #47242 - estebank:issue-15980, r=petrochenkov

    `struct` pattern parsing and diagnostic tweaks
    
     - Recover from struct parse error on match and point out missing match
       body.
     - Point at struct when finding non-identifier while parsing its fields.
     - Add label to "expected identifier, found {}" error.
    
    Fix #15980.
    bors committed Jan 13, 2018
    Copy the full SHA
    9b2f8ac View commit details
  5. Auto merge of #47251 - rkruppe:rm-simd-attr, r=eddyb

    Remove deprecated unstable attribute #[simd]
    
    The `#[simd]` attribute has been deprecated since c8b6d5b back in 2015. Any nightly crates using it have had ample time to switch to `#[repr(simd)]`, and if they didn't they're likely broken by now anyway.
    
    r? @eddyb
    bors committed Jan 13, 2018
    Copy the full SHA
    e6072a7 View commit details
Loading