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

Rollup of 6 pull requests #91413

Closed
wants to merge 16 commits into from

Commits on Sep 24, 2021

  1. Disallow non-c-like but "fieldless" ADTs from being casted to integer...

    ... if they use arbitrary enum discriminant. Code like
    
    ```rust
    enum Enum {
        Foo = 1,
        Bar(),
        Baz{}
    }
    ```
    
    seems to be unintentionally allowed so we couldn't disallow them now,
    but we could disallow them if arbitrary enum discriminant is used before
    1.56 hits stable.
    nbdd0121 committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    996e5ed View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

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

Commits on Nov 22, 2021

  1. Only shown relevant type params in E0283 label

    When we point at a binding to suggest giving it a type, erase all the
    type for ADTs that have been resolved, leaving only the ones that could
    not be inferred. For small shallow types this is not a problem, but for
    big nested types with lots of params, this can otherwise cause a lot of
    unnecessary visual output.
    estebank committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    577e985 View commit details
    Browse the repository at this point in the history
  2. Refer to uninferred const params by their name, instead of { _: _ }

    When the value of a const param isn't inferred, replace it with the
    param name from the definition.
    estebank committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    d0d51ea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a08bef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e462819 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Update CoverageMappingFormat Support to Version6

    Version 5 adds Branch Regions which are a prerequisite for branch coverage.
    Version 6 can use the zeroth filename as prefix for other relative files.
    Swatinem authored and richkadel committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    566ad8d View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

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

Commits on Nov 30, 2021

  1. Configuration menu
    Copy the full SHA
    abd704b View commit details
    Browse the repository at this point in the history
  2. Add conditional support for coverage map version 6

    This commit augments Swatinem's initial commit in uncommitted PR rust-lang#90047,
    which was a great starting point, but did not fully support LLVM
    Coverage Mapping Format version 6.
    
    Version 6 requires adding the compilation directory when file paths are
    relative, and since Rustc coverage maps use relative paths, we should
    add the expected compilation directory entry.
    
    Note, however, that with the compilation directory, coverage reports
    from `llvm-cov show` can now report file names (when the report includes
    more than one file) with the full absolute path to the file.
    
    This would be a problem for test results, but the workaround (for the
    rust coverage tests) is to include an additional `llvm-cov show`
    parameter: `--compilation-dir=.`
    richkadel committed Nov 30, 2021
    Configuration menu
    Copy the full SHA
    0c57fab View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Rollup merge of rust-lang#89234 - nbdd0121:discr, r=jackh726

    Disallow non-c-like but "fieldless" ADTs from being casted to integer if they use arbitrary enum discriminant
    
    Code like
    
    ```rust
    #[repr(u8)]
    enum Enum {
        Foo /* = 0 */,
        Bar(),
        Baz{}
    }
    
    let x = Enum::Bar() as u8;
    ```
    
    seems to be unintentionally allowed so we couldn't disallow them now ~~, but we could disallow them if arbitrary enum discriminant is used before 1.56 hits stable~~ (stabilization was reverted).
    
    Related: rust-lang#88621
    
    `@rustbot` label +T-lang
    matthiaskrgr authored Dec 1, 2021
    Configuration menu
    Copy the full SHA
    fdc0ce8 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#90709 - estebank:erase-known-type-params, r…

    …=nagisa
    
    Only shown relevant type params in E0283 label
    
    When we point at a binding to suggest giving it a type, erase all the
    type for ADTs that have been resolved, leaving only the ones that could
    not be inferred. For small shallow types this is not a problem, but for
    big nested types with lots of params, this can otherwise cause a lot of
    unnecessary visual output.
    matthiaskrgr authored Dec 1, 2021
    Configuration menu
    Copy the full SHA
    5854ef4 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#90985 - camsteffen:diag-name-usage, r=jackh726

    Use `get_diagnostic_name` more
    matthiaskrgr authored Dec 1, 2021
    Configuration menu
    Copy the full SHA
    b46ba49 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#91087 - rukai:fix_test_nll_revisions, r=jac…

    …kh726
    
    Remove all migrate.nll.stderr files
    
    There are a few ui tests that setup the revisions like:
    ```rust
    // revisions: migrate nll`
    // [nll]compile-flags: -Zborrowck=mir
    ```
    
    However most of them fail to disable the nll compare mode like this:
    ```rust
    // ignore-compare-mode-nll
    ```
    
    This ends up generating confusing files ending in `.migrate.nll.stderr` because the nll compare mode is run on top of the migrate revision.
    
    This PR fixes this by adding `ignore-compare-mode-nll` to these tests.
    
    I would have just made these tests use compare modes instead but I assume the reason these tests are messing around with revisions instead of just letting the nll compare mode do its thing is to enforce error annotations for both migrate and nll.
    Relying on just compare modes would only have the error annotations for migrate.
    matthiaskrgr authored Dec 1, 2021
    Configuration menu
    Copy the full SHA
    1b237b3 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#91207 - richkadel:rk-bump-coverage-version,…

    … r=tmandry
    
    Add support for LLVM coverage mapping format versions 5 and 6
    
    This PR cherry-pick's Swatinem's initial commit in unsubmitted PR rust-lang#90047.
    
    My additional commit augments Swatinem's great starting point, but adds full support for LLVM
    Coverage Mapping Format version 6, conditionally, if compiling with LLVM 13.
    
    Version 6 requires adding the compilation directory when file paths are
    relative, and since Rustc coverage maps use relative paths, we should
    add the expected compilation directory entry.
    
    Note, however, that with the compilation directory, coverage reports
    from `llvm-cov show` can now report file names (when the report includes
    more than one file) with the full absolute path to the file.
    
    This would be a problem for test results, but the workaround (for the
    rust coverage tests) is to include an additional `llvm-cov show`
    parameter: `--compilation-dir=.`
    matthiaskrgr authored Dec 1, 2021
    Configuration menu
    Copy the full SHA
    7966906 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#91298 - FabianWolff:issue-91028-source-avai…

    …l, r=cjgillot
    
    Improve error message for `E0659` if the source is not available
    
    Fixes rust-lang#91028. The fix is similar to those in rust-lang#89233 and rust-lang#87088. With this change, instead of the dangling
    ```
    note: `Option` could also refer to the enum defined here
    ```
    I get
    ```
    note: `Option` could also refer to an enum from prelude
    ```
    If the standard library source code _is_ available, the output does not change.
    matthiaskrgr authored Dec 1, 2021
    Configuration menu
    Copy the full SHA
    90af5e6 View commit details
    Browse the repository at this point in the history