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 #80436

Closed
wants to merge 63 commits into from

Commits on Nov 27, 2020

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

Commits on Nov 29, 2020

  1. Sync from rust 760430e

    bjorn3 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    3d357e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7760894 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2020

  1. Configuration menu
    Copy the full SHA
    a8cda1a View commit details
    Browse the repository at this point in the history
  2. Update Cranelift

    bjorn3 committed Dec 3, 2020
    Configuration menu
    Copy the full SHA
    64e7ff2 View commit details
    Browse the repository at this point in the history
  3. Support #[repr(simd)] on array wrappers

    Complement to rust-lang#78863
    bjorn3 committed Dec 3, 2020
    Configuration menu
    Copy the full SHA
    d95d03a View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2020

  1. Update Cranelift

    This includes bytecodealliance/wasmtime#2403 which enables hotswapping with SimpleJIT
    bjorn3 committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    3f28a49 View commit details
    Browse the repository at this point in the history
  2. Inline codegen_mono_item

    bjorn3 committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    5f21ff2 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2020

  1. Lint on redundant trailing semicolon after item

    We now lint on code like this:
    
    ```rust
    fn main() {
        fn foo() {};
        struct Bar {};
    }
    ```
    
    Previously, this caused warnings in Cargo, so it was disabled.
    Aaron1011 committed Dec 7, 2020
    Configuration menu
    Copy the full SHA
    6ada445 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8913419 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2020

  1. Configuration menu
    Copy the full SHA
    fdc336c View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
    Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
    3 people committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    7bb1889 View commit details
    Browse the repository at this point in the history
  3. Update RELEASES.md

    XAMPPRocky committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    468c578 View commit details
    Browse the repository at this point in the history
  4. Update RELEASES.md

    Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
    XAMPPRocky and jonas-schievink committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    edb55e9 View commit details
    Browse the repository at this point in the history
  5. Update RELEASES.md

    XAMPPRocky committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    4aaace9 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2020

  1. Optimize branches when the target is statically known to a jump

    This can happen in generic code
    bjorn3 committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    994b91a View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#77611 - oli-obk:atomic_miri_leakage, r=nagisa

    Directly use raw pointers in `AtomicPtr` store/load
    
    I was unable to find any reason for this limitation in the latest source of LLVM or in the documentation [here](http://llvm.org/docs/Atomics.html#libcalls-atomic).
    
    fixes rust-lang/miri#1574
    bors committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    aec0fc5 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2020

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

Commits on Dec 12, 2020

  1. Update Cranelift

    bjorn3 committed Dec 12, 2020
    Configuration menu
    Copy the full SHA
    f8e22bf View commit details
    Browse the repository at this point in the history
  2. Enable Cranelift optimizations when optimizing

    LICM in Cranelift has been fixed recently
    bjorn3 committed Dec 12, 2020
    Configuration menu
    Copy the full SHA
    3f47f93 View commit details
    Browse the repository at this point in the history
  3. Update RELEASES.md

    XAMPPRocky committed Dec 12, 2020
    Configuration menu
    Copy the full SHA
    bb6b6ae View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2020

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

Commits on Dec 14, 2020

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

Commits on Dec 16, 2020

  1. cg_clif: fix build with split dwarf

    This commit makes minor changes to the cranelift backend so that it can
    build given changes in cg_ssa for Split DWARF.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    5f6c32a View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2020

  1. Configuration menu
    Copy the full SHA
    2c0dccb View commit details
    Browse the repository at this point in the history
  2. Fix tests

    bjorn3 committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    3a3a23f View commit details
    Browse the repository at this point in the history
  3. Sync from rust caeb333

    bjorn3 committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    0f57e1c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8e234d5 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#79945 - jackh726:existential_trait_ref, r=nik…

    …omatsakis
    
    Move binder for dyn to each list item
    
    This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`.
    
    This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `@rust-lang/wg-traits.`
    
    r? `@nikomatsakis`
    bors committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    a921a47 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2020

  1. Sync from rust fee693d

    bjorn3 committed Dec 18, 2020
    Configuration menu
    Copy the full SHA
    06e77b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32f92aa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54ba238 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c1fc32 View commit details
    Browse the repository at this point in the history
  5. Update RELEASES.md

    XAMPPRocky committed Dec 18, 2020
    Configuration menu
    Copy the full SHA
    cce4c72 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2020

  1. Suggest fn ptr rather than fn item and suggest to use Fn trait boun…

    …ds rather than the unique closure type in E0121
    
    This is a squash of the titular commit along with these minor commits:
    - Improve note
    - Improve note pt2
    ThePuzzlemaker committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    4f6be46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e6dc92 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2020

  1. Sync from rust 28d73a3

    bjorn3 committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    dfe6495 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    510616f View commit details
    Browse the repository at this point in the history
  3. Add more comments to trait queries

    This also adds back a comment that was mistakenly removed in
    ac9dfc3.
    jyn514 committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    979d3ce View commit details
    Browse the repository at this point in the history
  4. Update RELEASES.md

    XAMPPRocky committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    481f6db View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2020

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

Commits on Dec 25, 2020

  1. Configuration menu
    Copy the full SHA
    82acbc8 View commit details
    Browse the repository at this point in the history
  2. Use PIC in JIT mode too

    bjorn3 committed Dec 25, 2020
    Configuration menu
    Copy the full SHA
    c556e4d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    20ffea6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0b9b253 View commit details
    Browse the repository at this point in the history
  5. Implement lazy compilation in JIT mode

    Lazy compilation has the potential to significantly improve the startup
    time of a program. While functions have to be codegened when called, it
    is expected that a significant amount of all code is only required when
    an error occurs or only when the program is used in certain ways.
    
    The basic approach is to first codegen a shim for each function. This
    shim calls the `__cg_clif_jit` function of cg_clif with a pointer to the
    `Instance` corresponding to the function for which it is a shim.
    `__cg_clif_jit` function then codegens this function and uses the hot
    code swapping support of SimpleJIT to redirect future calls to the
    function to the real version. Finally it calls the newly codegened
    function.
    bjorn3 committed Dec 25, 2020
    Configuration menu
    Copy the full SHA
    3f6a3b5 View commit details
    Browse the repository at this point in the history
  6. Add documentation

    bjorn3 committed Dec 25, 2020
    Configuration menu
    Copy the full SHA
    35f4a25 View commit details
    Browse the repository at this point in the history
  7. Merge pull request rust-lang#1120 from bjorn3/lazy_jit

    Lazy compilation in jit mode
    bjorn3 committed Dec 25, 2020
    Configuration menu
    Copy the full SHA
    2ca8daa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5b32489 View commit details
    Browse the repository at this point in the history
  9. Rustfmt

    bjorn3 committed Dec 25, 2020
    Configuration menu
    Copy the full SHA
    dbee136 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2020

  1. Remove FIXME in rustc_privacy

    jyn514 committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    53da233 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    52cf01c View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2020

  1. Rollup merge of rust-lang#79662 - bjorn3:move_more_code_out_of_codege…

    …n_backend, r=oli-obk
    
    Move some more code out of CodegenBackend::{codegen_crate,link}
    
    Kind of a follow up to rust-lang#77795
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    58aefbd View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#79812 - Aaron1011:lint-item-trailing-semi, …

    …r=oli-obk
    
    Lint on redundant trailing semicolon after item
    
    We now lint on code like this:
    
    ```rust
    fn main() {
        fn foo() {};
        struct Bar {};
    }
    ```
    
    Previously, this caused warnings in Cargo, so it was disabled.
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    761400f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#79815 - XAMPPRocky:relnotes-1.49.0, r=Mark-…

    …Simulacrum
    
    Update RELEASES.md for 1.49.0
    
    ### [Rendered](https://github.com/XAMPPRocky/rust/tree/relnotes-1.49.0/RELEASES.md)
    
    r? `@Mark-Simulacrum`
    cc `@rust-lang/release`
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    549b591 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#80284 - ThePuzzlemaker:issue-80179-fix, r=v…

    …arkor
    
    Suggest fn ptr rather than fn item and suggest to use `Fn` trait bounds rather than the unique closure type in E0121
    
    Previously, using `_` as a return type in a function that returned a function/closure would provide a diagnostic that would cause a papercut. For example:
    ```rust
    fn f() -> i32 { 0 }
    fn fn_ptr() -> _ { f }
    fn closure() -> _ { || 0 }
    ```
    would result in this diagnostic:
    ```rust
    error[E0121]: the type placeholder `_` is not allowed within types on item signatures
     --> <anon>:2:16
      |
    2 | fn fn_ptr() -> _ { f }
      |                ^
      |                |
      |                not allowed in type signatures
      |                help: replace with the correct return type: `fn() -> i32 {f}`
    
    error[E0121]: the type placeholder `_` is not allowed within types on item signatures
     --> <anon>:3:17
      |
    3 | fn closure() -> _ { || 0 }
      |                 ^
      |                 |
      |                 not allowed in type signatures
      |                 help: replace with the correct return type: `[closure@<anon>:3:21: 3:25]`
    
    error: aborting due to 2 previous errors
    
    For more information about this error, try `rustc --explain E0121`.
    ```
    As can be seen, it was suggested to use the function definition return type `fn() -> i32 { f }` which is not valid syntax as a return type. Additionally, closures cause a papercut as unique closure types (notated in this case as `[closure@<anon>:3:21: 3:25]`) are not valid syntax either.
    
    Instead, this PR implements this version of the diagnostic (this example is for the same code featured above):
    ```rust
    error[E0121]: the type placeholder `_` is not allowed within types on item signatures
     --> <anon>:2:16
      |
    2 | fn fn_ptr() -> _ { f }
      |                ^
      |                |
      |                not allowed in type signatures
      |                help: replace with the correct return type: `fn() -> i32`
    
    error[E0121]: the type placeholder `_` is not allowed within types on item signatures
     --> <anon>:3:17
      |
    3 | fn closure() -> _ { || 0 }
      |                 ^ not allowed in type signatures
      |
      = help: consider using an `Fn`, `FnMut`, or `FnOnce` trait bound
      = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
    
    error: aborting due to 2 previous errors
    
    For more information about this error, try `rustc --explain E0121`.
    ```
    As can be seen in this diagnostic, the papercut for returning a function item is fixed by suggesting the usage of a function pointer as the return type. As for closures, it's suggested to use an `Fn`, `FnMut`, or `FnOnce` trait bound (with further reading on closures and `Fn` traits in *The Book* for beginners). I did not implement a suggestion to use `impl Fn() -> i32` syntax as that was out-of-scope for my abilities at the moment, therefore someone in the future may want to implement that. Also, it's possible to use either `impl Trait` syntax, generics, or generics with a `where` clause, and some users may not want to use `impl Trait` syntax for their own reasons.
    
    This PR fixes rust-lang#80179.
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    aa28a91 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#80331 - jyn514:docs, r=varkor

    Add more comments to trait queries
    
    This also adds back a comment that was mistakenly removed in
    ac9dfc3.
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    80bf28e View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#80344 - matthiaskrgr:matches, r=Dylan-DPC

    use matches!() macro in more places
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    14c42d8 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#80353 - ssomers:btree_test_split_off, r=Mar…

    …k-Simulacrum
    
    BTreeMap: test split_off (and append) more thoroughly
    
    Using DeterministicRng as a poor man's property based testing rig.
    r? `@Mark-Simulacrum`
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    2660e04 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cc579a1 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#80399 - jyn514:hir-id-cleanup, r=marmeladema

    Remove FIXME in rustc_privacy
    
    rust-lang#71104 has been fixed.
    
    r? `@marmeladema` if you have time, otherwise `@petrochenkov`
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    1a18fb4 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#80408 - bjorn3:sync_cg_clif-2020-12-27, r=b…

    …jorn3
    
    Sync rustc_codegen_cranelift
    
    The highlight of this sync are two JIT mode improvements. The first is that it is now possible to use JIT mode when using `-Zcodegen-backend` instead of the custom driver using `-Cllvm-args=mode=jit`. The second one is a new JIT mode that lazily compiles functions when they are called the first time: https://github.com/bjorn3/rustc_codegen_cranelift/pull/1120
    
    In addition this includes a few small runtime performance improvements and various fixes for rustc changes that didn't cause compilation to fail.
    
    r? `@ghost`
    
    `@rustbot` label +A-codegen +A-cranelift +T-compiler
    Dylan-DPC committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    d3409f8 View commit details
    Browse the repository at this point in the history