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 11 pull requests #106634

Closed
wants to merge 31 commits into from
Closed

Commits on Dec 13, 2022

  1. Remove invalid case for mutable borrow suggestion

    If we have a call such as `foo(&mut buf)` and after reference
    collapsing the type is inferred as `&T` where-as the required type is
    `&mut T`, don't suggest `foo(&mut mut buf)`. This is wrong syntactically
    and the issue lies elsewhere, not in the borrow.
    
    Fixes rust-lang#105645
    RedDocMD committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    9c8bf51 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. Clean up mut keyword check

    RedDocMD committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    afefbb6 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2022

  1. Fix ui constant tests for big-endian platforms

    A number of tests under ui/const-ptr and ui/consts are currently
    failing on big-endian platforms as the binary encoding of some
    constants is hard-coded in the stderr test files.  Fix this by
    providing a normalize-stderr-test rule that strips out the
    raw bytes hex dump, so the comparison can be done in an
    endianness-independent manner.  Note that in most cases, this
    means the tests are now also independent of word size, so the
    32bit and 64bit cases can be re-unified.
    
    To keep tests that verify the details of those raw bytes dumps,
    a new test case raw-bytes.rs performs the tests where the hex
    dumps were stripped out a second time, but only on little-
    endian platforms.
    
    In addition, src/test/ui/const-ptr/forbidden_slices.rs exposes
    an endian-specific difference in this diagnostic output:
       constructing invalid value at .<deref>[0]: encountered 0x11,
       but expected a boolean
    depending on which byte of D0 is not a boolean value (0 or 1).
    Fixed this by choosing a value of D0 that differs from 0 or 1
    in all bytes.
    
    Fixes part of rust-lang#105383.
    uweigand committed Dec 27, 2022
    Configuration menu
    Copy the full SHA
    73e7207 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2022

  1. Configuration menu
    Copy the full SHA
    cc1dee1 View commit details
    Browse the repository at this point in the history
  2. Add ui test for rust-lang#106182

    obeis committed Dec 30, 2022
    Configuration menu
    Copy the full SHA
    a74a488 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2023

  1. Configuration menu
    Copy the full SHA
    50ab306 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c104ee9 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2023

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

Commits on Jan 6, 2023

  1. Enable Shadow Call Stack for Fuchsia on AArch64

    Fuchsia already uses SCS by default for C/C++ code on ARM hardware.
    This patch allows SCS to be used for Rust code as well.
    ilovepi committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    c5bde06 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2023

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

Commits on Jan 8, 2023

  1. Configuration menu
    Copy the full SHA
    04f3e16 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    21ff605 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2023

  1. Configuration menu
    Copy the full SHA
    ecc0507 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    24ce65c View commit details
    Browse the repository at this point in the history
  3. fix: fix CI errors

    Ezrashaw committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    2c92c72 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    abe040d View commit details
    Browse the repository at this point in the history
  5. Change based on comments

    Instead of just switching to a probe, check for different matches, and see how many there are.
    If one, unify it, otherwise return true and let it be unified later.
    JulianKnodt committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    77b6137 View commit details
    Browse the repository at this point in the history
  6. Set !const_evaluatable if ambig. and not inferred

    This prevents an ICE due to a value not actually being evaluatable later.
    JulianKnodt committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    b79a9a0 View commit details
    Browse the repository at this point in the history
  7. Check for duplicates

    JulianKnodt committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    7c5cb73 View commit details
    Browse the repository at this point in the history
  8. Clean up

    Simplify match statement
    
    Add multiple tests
    - 1 test for checking `N + 1 + 1` does not unify with `N+1`
    - 2 tests for checking that a function that uses two parameters only returns the parameter that
      is actually used.
    - Check exact repeat predicates
    JulianKnodt committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    21c5ffe View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#105292 - JulianKnodt:no_eager_commit, r=Box…

    …yUwU
    
    Change a commit_if_ok call to probe
    
    Removes an over-eager `commit_if_ok` which makes inference worse.
    
    I'm not entirely sure whether it's ok to remove the check that types are the same, because casting seems to cause equality checks with incorrect types?
    
    Fixes rust-lang#105037
    
    r? ``@BoxyUwU``
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    e1965d0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#105655 - RedDocMD:bug-105645, r=oli-obk

    Remove invalid case for mutable borrow suggestion
    
    If we have a call such as `foo(&mut buf)` and after reference
    collapsing the type is inferred as `&T` where-as the required type is
    `&mut T`, don't suggest `foo(&mut mut buf)`. This is wrong syntactically
    and the issue lies elsewhere, not in the borrow.
    
    Fixes rust-lang#105645
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    a50c757 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#106047 - uweigand:s390x-test-bigendian-ui, …

    …r=oli-obk
    
    Fix ui constant tests for big-endian platforms
    
    A number of tests under ui/const-ptr and ui/consts are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the stderr test files.
    
    Fix this by a combination of two types of changes:
    
    - Where possible (i.e. where the particular value of a constant does not affect the purpose of the test), choose constant values that have the same encoding on big- and little-endian platforms.
    
    - Where this is not possible, provide a normalize-stderr-test rule that transforms the printed big-endian encoding of such constants into the corresponding little-endian form.
    
    Fixes part of rust-lang#105383.
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    3cc24ec View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#106061 - ilovepi:fuchsia-scs, r=oli-obk

    Enable Shadow Call Stack for Fuchsia on AArch64
    
    Fuchsia already uses SCS by default for C/C++ code on ARM hardware. This patch allows SCS to be used for Rust code as well.
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    78cff46 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#106164 - compiler-errors:check-region-tweak…

    …, r=oli-obk
    
    Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`
    
    Makes sense for this function to live with its sibling `resolve_regions_and_report_errors`, around which it's basically just a wrapper.
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    10529bc View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#106291 - obeis:issue-106182, r=oli-obk

    Fix incorrect suggestion for extra `&` in pattern
    
    Closes rust-lang#106182
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    b91bb01 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#106389 - compiler-errors:no-canonicalized, …

    …r=lcnr
    
    Simplify some canonical type alias names
    
    * delete the `Canonicalized<'tcx>` type alias in favor for `Canonical<'tcx>`
    * `CanonicalizedQueryResponse` -> `CanonicalQueryResponse`
    
    I don't particularly care about the latter, but it should be consistent. We could alternatively delete the first alias and rename the struct to `Canonicalized`, and then keep the name of `CanonicalizedQueryResponse` untouched.
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    26e6a48 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#106468 - compiler-errors:err-instability, r…

    …=lcnr
    
    Use FxIndexSet when updating obligation causes in `adjust_fulfillment_errors_for_expr_obligation`
    
    I have no idea how to test this reliably, but I've **manually** verified it fixes the instability in rust-lang#106417 that isn't due to dtolnay/trybuild#212.
    
    Fixes rust-lang#106417
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    d3cae2b View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#106549 - wcampbell0x2a:use-fmt-named-parame…

    …ters-borrowck, r=estebank
    
    Use fmt named parameters in rustc_borrowck
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    e49d0c3 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#106608 - compiler-errors:missing-generics-v…

    …erbose, r=estebank
    
    Render missing generics suggestion verbosely
    
    It's a bit easier to read like this, especially ones that are appending new generics onto an existing list, like ": `, T`" which render somewhat poorly inline.
    
    Also don't suggest `dyn` as a type parameter to add, even if technically that's valid in edition 2015.
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    e9b0aed View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#106614 - Ezrashaw:ui-test-fixups-2, r=Guill…

    …aumeGomez
    
    error-code docs improvements (No. 2)
    
    - Added empty error-code docs for `E0208`, `E0640` and `E0717` with the "internal" header as discussed on Discord.
    - Wrote docs and UI test for `E0711`, again with the header.
    - `tidy` changes are common-sense and make everything pass, `style.rs` hack is annoying though.
    
    r? ``@GuillaumeGomez``
    Yuki Okushi authored Jan 9, 2023
    Configuration menu
    Copy the full SHA
    3bb993c View commit details
    Browse the repository at this point in the history