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 8 pull requests #78176

Closed
wants to merge 29 commits into from
Closed

Commits on Oct 8, 2020

  1. Add Pin::new_static.

    m-ou-se committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    64839ee View commit details
    Browse the repository at this point in the history
  2. Make Pin::new_static const.

    m-ou-se committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    390883e View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2020

  1. Configuration menu
    Copy the full SHA
    104c0f0 View commit details
    Browse the repository at this point in the history
  2. Add Pin::static_mut.

    m-ou-se committed Oct 12, 2020
    Configuration menu
    Copy the full SHA
    2c71f68 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2020

  1. Reword safety guarantee of Pin::static_{ref,mut}.

    Co-authored-by: Peter Todd <pete@petertodd.org>
    m-ou-se and petertodd committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    f83446b View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2020

  1. Add missing mut.

    Co-authored-by: David Tolnay <dtolnay@gmail.com>
    m-ou-se and dtolnay committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    df95dce View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2020

  1. Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling

    This resolves issues where the cross-build of LLVM fails because it tries to
    link to the host's system libraries instead of the target's system libraries.
    nielx committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    7b652d3 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2020

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

Commits on Oct 18, 2020

  1. Improve wording of "cannot multiply" type error

    For example, if you had this code:
    
        fn foo(x: i32, y: f32) -> f32 {
            x * y
        }
    
    You would get this error:
    
        error[E0277]: cannot multiply `f32` to `i32`
         --> src/lib.rs:2:7
          |
        2 |     x * y
          |       ^ no implementation for `i32 * f32`
          |
          = help: the trait `Mul<f32>` is not implemented for `i32`
    
    However, that's not usually how people describe multiplication. People
    usually describe multiplication like how the division error words it:
    
        error[E0277]: cannot divide `i32` by `f32`
         --> src/lib.rs:2:7
          |
        2 |     x / y
          |       ^ no implementation for `i32 / f32`
          |
          = help: the trait `Div<f32>` is not implemented for `i32`
    
    So that's what this change does. It changes this:
    
        error[E0277]: cannot multiply `f32` to `i32`
         --> src/lib.rs:2:7
          |
        2 |     x * y
          |       ^ no implementation for `i32 * f32`
          |
          = help: the trait `Mul<f32>` is not implemented for `i32`
    
    To this:
    
        error[E0277]: cannot multiply `i32` by `f32`
         --> src/lib.rs:2:7
          |
        2 |     x * y
          |       ^ no implementation for `i32 * f32`
          |
          = help: the trait `Mul<f32>` is not implemented for `i32`
    camelid committed Oct 18, 2020
    Configuration menu
    Copy the full SHA
    7b33ae6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    003516f View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2020

  1. rustdoc: Show the correct source filename, without .html

    Previously the title would be
    
        lib.rs.html -- source
    
    if `lib.rs` was the actual source filename. Now the title is
    
        lib.rs – source
    
    (note the en dash).
    camelid committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    48060f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17c6c59 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8f0bced View commit details
    Browse the repository at this point in the history
  4. remove what seems to be an outdated comment

    Even in the PR that introduced this comment, it does not seem like these locals are actually ignored -- just their `source_info` is adjusted:
    https://github.com/rust-lang/rust/pull/44700/files#diff-ae2f3c7e2f9744f7ef43e96072b10e98d4e3fe74a3a399a3ad8a810fbe56c520R139
    RalfJung committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    cb33f95 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c1766c6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    153e843 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9dd0bb6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d641cb8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dcd2d91 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2020

  1. Apply some review suggestions

    camelid committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    243c8e9 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2020

  1. Rollup merge of rust-lang#77726 - fusion-engineering-forks:static-pin…

    …, r=dtolnay
    
    Add Pin::static_ref, static_mut.
    
    This adds `Pin::static_ref` and `Pin::static_mut`, which convert a static reference to a pinned static reference.
    
    Static references are effectively already pinned, as what they refer to has to live forever and can never be moved.
    
    ---
    
    Context: I want to update the `sys` and `sys_common` mutexes/rwlocks/condvars to use `Pin<&self>` in their functions, instead of only warning in the unsafety comments that they may not be moved. That should make them a little bit less dangerous to use. Putting such an object in a `static` (e.g. through `sys_common::StaticMutex`) fulfills the requirements about never moving it, but right now there's no safe way to get a `Pin<&T>` to a `static`. This solves that.
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    154acf0 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#77976 - oliviacrain:issue-77915-fix, r=matt…

    …hewjasper
    
    Mark inout asm! operands as used in liveness pass
    
    Variables used in `inout` operands in inline assembly (that is, they're used as both input and output to some arbitrary assembly instruction) are being marked as read and written, but are not marked as being used in the RWU table during the liveness pass. This can result in such expressions triggering an unused variable lint warning. This is incorrect behavior- reads without uses are currently only used for compound assignments. We conservatively assume that an `inout` operand is being read and used in the context of the assembly instruction.
    
    Closes rust-lang#77915
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    983299f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#78009 - nielx:fix/CMAKE_SYSTEM_NAME, r=Mark…

    …-Simulacrum
    
    Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling
    
    This resolves issues where the cross-build of LLVM fails because it tries to
    link to the host's system libraries instead of the target's system libraries.
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    ec025ba View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#78056 - ssomers:btree_chop_up_1, r=dtolnay

    BTreeMap: split off most code of remove and split_off
    
    Putting map.rs on a diet, in addition to rust-lang#77851.
    r? @dtolnay
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    1e9e561 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#78063 - camelid:improve-cannot-multiply-err…

    …or, r=estebank
    
    Improve wording of "cannot multiply" type error
    
    For example, if you had this code:
    
        fn foo(x: i32, y: f32) -> f32 {
            x * y
        }
    
    You would get this error:
    
        error[E0277]: cannot multiply `f32` to `i32`
         --> src/lib.rs:2:7
          |
        2 |     x * y
          |       ^ no implementation for `i32 * f32`
          |
          = help: the trait `Mul<f32>` is not implemented for `i32`
    
    However, that's not usually how people describe multiplication. People
    usually describe multiplication like how the division error words it:
    
        error[E0277]: cannot divide `i32` by `f32`
         --> src/lib.rs:2:7
          |
        2 |     x / y
          |       ^ no implementation for `i32 / f32`
          |
          = help: the trait `Div<f32>` is not implemented for `i32`
    
    So that's what this change does. It changes this:
    
        error[E0277]: cannot multiply `f32` to `i32`
         --> src/lib.rs:2:7
          |
        2 |     x * y
          |       ^ no implementation for `i32 * f32`
          |
          = help: the trait `Mul<f32>` is not implemented for `i32`
    
    To this:
    
        error[E0277]: cannot multiply `i32` by `f32`
         --> src/lib.rs:2:7
          |
        2 |     x * y
          |       ^ no implementation for `i32 * f32`
          |
          = help: the trait `Mul<f32>` is not implemented for `i32`
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    76da0e2 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#78094 - camelid:rustdoc-fix-source-title, r…

    …=jyn514
    
    rustdoc: Show the correct source filename in page titles, without `.html`
    
    Previously the title would be
    
        lib.rs.html -- source
    
    if `lib.rs` was the actual source filename. Now the title is
    
        lib.rs - source
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    0d3f068 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#78101 - RalfJung:foreign-static, r=oli-obk

    fix static_ptr_ty for foreign statics
    
    Cc rust-lang#74840
    
    This does not fix that issue but fixes a problem in `static_ptr_ty` that we noticed while discussing that issue. I also added and updated a few comments. The one about `internal` locals being ignored does not seem to have been true [even in the commit that introduced it](https://github.com/rust-lang/rust/pull/44700/files#diff-ae2f3c7e2f9744f7ef43e96072b10e98d4e3fe74a3a399a3ad8a810fbe56c520R139).
    
    r? @oli-obk
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    dbb36ab View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#78118 - spastorino:inline-const-followups, …

    …r=petrochenkov
    
    Inline const followups
    
    r? @petrochenkov
    
    Follow ups of rust-lang#77124
    JohnTitor committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    34c2223 View commit details
    Browse the repository at this point in the history