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 10 pull requests #104671

Closed
wants to merge 24 commits into from

Commits on Nov 14, 2022

  1. Fix doc example for wrapping_abs

    The `max` variable is unused. This change introduces the `min_plus`
    variable, to make the example similar to the one from `saturating_abs`.
    An alternative would be to remove the unused variable.
    TethysSvensson committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    089475a View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

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

Commits on Nov 18, 2022

  1. Configuration menu
    Copy the full SHA
    e4f618f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3722788 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65b3a30 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    67e746c View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2022

  1. Configuration menu
    Copy the full SHA
    c36ff28 View commit details
    Browse the repository at this point in the history
  2. deduplicate constant evaluation in cranelift backend

    also sync LLVM and cranelift structure a bit
    RalfJung committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    3338244 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2022

  1. Revert "Update CI to use Android NDK r25b"

    This reverts commit bf7f1ca.
    Alex Pinkus committed Nov 20, 2022
    Configuration menu
    Copy the full SHA
    6f1c7b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00bf999 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    30b7e44 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2022

  1. Streamline deriving on packed structs.

    The current approach to field accesses in derived code:
    - Normal case: `&self.0`
    - In a packed struct that derives `Copy`: `&{self.0}`
    - In a packed struct that doesn't derive `Copy`: `let Self(ref x) = *self`
    
    The `let` pattern used in the third case is equivalent to the simpler
    field access in the first case. This commit changes the third case to
    use a field access.
    
    The commit also combines two boolean arguments (`is_packed` and
    `always_copy`) into a single field (`copy_fields`) earlier, to save
    passing both around.
    nnethercote committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    a6e09a1 View commit details
    Browse the repository at this point in the history
  2. Remove ref patterns from rustc_ast

    Also use if let chains in one case.
    WaffleLapkin committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    417ed9f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9f2c0b View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#104269 - compiler-errors:hang-in-where-clau…

    …se-sugg, r=lcnr
    
    Fix hang in where-clause suggestion with `predicate_can_apply`
    
    Using `predicate_may_hold` during error reporting causes an evaluation overflow, which (because we use `evaluate_obligation_no_overflow`) then causes the predicate to need to be re-evaluated locally, which results in a hang.
    
    ... but since the "add a where clause" suggestion is best-effort, just throw any overflow errors. No need for 100% accuracy.
    
    r? `@lcnr` who has been thinking about overflows... Let me know if you want more context about this issue, and as always, feel free to reassign.
    
    Fixes rust-lang#104225
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    2263e0d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#104420 - TethysSvensson:master, r=JohnTitor

    Fix doc example for `wrapping_abs`
    
    The `max` variable is unused. This change introduces the `min_plus` variable, to make the example similar to the one from `saturating_abs`. An alternative would be to remove the unused variable.
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    b938a2b View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#104499 - Enselic:no-method-in-rustdoc-json,…

    … r=GuillaumeGomez
    
    rustdoc JSON: Use `Function` everywhere and remove `Method`
    
    Closes rust-lang#100259
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    351731d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#104500 - WaffleLapkin:deref-the-compiler, r…

    …=wesleywiser
    
    `rustc_ast`: remove `ref` patterns
    
    Or in other words use match ergonomics in `rustc_ast`. I do plan to do the same with other crates, but to keep the diff sane, let's do them one at a time.
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    e9d940f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#104511 - dpaoliello:privateglobalworkaround…

    …, r=michaelwoerister
    
    Mark functions created for `raw-dylib` on x86 with DllImport storage class
    
    Fix for rust-lang#104453
    
    ## Issue Details
    On x86 Windows, LLVM uses 'L' as the prefix for any private global symbols (`PrivateGlobalPrefix`), so when the `raw-dylib` feature creates an undecorated function symbol that begins with an 'L' LLVM misinterprets that as a private global symbol that it created and so fails the compilation at a later stage since such a symbol must have a definition.
    
    ## Fix Details
    Mark the function we are creating for `raw-dylib` with `DllImport` storage class (this was already being done for MSVC at a later point for `callee::get_fn` but not for GNU (due to "backwards compatibility")): this will cause LLVM to prefix the name with `__imp_` and so it won't mistake it for a private global symbol.
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    4eb13ef View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#104595 - compiler-errors:poly-existential-p…

    …redicate, r=lcnr
    
    Add `PolyExistentialPredicate` type alias
    
    Wrapping `ExistentialPredicate`s in a binder is very common, and this alias already exists for the `PolyExistential{TraitRef,Projection}` types.
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    089a7c3 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#104605 - RalfJung:clf_consts, r=bjorn3

    deduplicate constant evaluation in cranelift backend
    
    The cranelift backend had two matches on `ConstantKind`, which can be avoided, and used this `eval_for_mir` that nothing else uses... this makes things more consistent with the (better-tested) LLVM backend.
    
    I noticed this because cranelift was the only user of `eval_for_mir`. However `try_eval_for_mir` still has one other user in `eval`... the odd thing is that the interpreter has its own `eval_mir_constant` which seems to duplicate the same functionality and does not use `try_eval_for_mir`. No idea what is happening here.
    
    r? `@bjorn3`
    Cc `@lcnr`
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    3c5c441 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#104628 - alex-pinkus:revert-android-ndk-upg…

    …rade, r=pietroalbini
    
    Revert "Update CI to use Android NDK r25b"
    
    This reverts commit bf7f1ca (pull request rust-lang#102332).
    
    The relevant discussion can be found in rust-lang#103673, where it was agreed that more time is needed to warn the community of the upcoming breakage.
    
    This PR is for the `master` branch, where a conflict was recently introduced due to 6d81602. The conflict is in `cc_detect.rs`, where the code that corrects the target triple was moved to a new function called `ndk_compiler()`. This puts the old logic in the `ndk_compiler` function, and assumes that it works properly in the other location where that code is being called. I would appreciate review from `@pietroalbini` to understand how we can test that the reverted logic is also suitable for the additional use case (seems to be related to setting `cc` and `cxx`). I've confirmed already that with these changes I can compile for `armv7-linux-androideabi`, `aarch64-linux-android`, `i686-linux-android`, and `x86_64-linux-android` using `x.py`.
    
    A separate revert for the `beta` branch will be required, since the original change has already made it to beta. The beta revert is available at alex-pinkus@3fa0d94, but I'm not sure of the process for staging that PR.
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    5fb1468 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#104662 - nnethercote:tweak-deriving-for-pac…

    …ked-non-copy, r=jackh726
    
    Streamline deriving on packed structs.
    
    The current approach to field accesses in derived code:
    - Normal case: `&self.0`
    - In a packed struct that derives `Copy`: `&{self.0}`
    - In a packed struct that doesn't derive `Copy`: `let Self(ref x) = *self`
    
    The `let` pattern used in the third case is equivalent to the simpler field access in the first case. This commit changes the third case to use a field access.
    
    The commit also combines two boolean arguments (`is_packed` and `always_copy`) into a single field (`copy_fields`) earlier, to save passing both around.
    
    r? `@jackh726`
    matthiaskrgr authored Nov 21, 2022
    Configuration menu
    Copy the full SHA
    6cb88b0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    cedb127 View commit details
    Browse the repository at this point in the history