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 7 pull requests #73052

Closed
wants to merge 20 commits into from
Closed

Commits on May 2, 2020

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

Commits on May 28, 2020

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

Commits on May 31, 2020

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

Commits on Jun 4, 2020

  1. Configuration menu
    Copy the full SHA
    95e9768 View commit details
    Browse the repository at this point in the history
  2. test: codegen: riscv64-abi: print value numbers for unnamed func args

    LLVM 10 includes a009a60 which will
    print value numbers for unnamed func args.
    
    Update these tests to be in line with the referenced clang tests.
    tblah committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    c872dcf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    37e8e05 View commit details
    Browse the repository at this point in the history
  4. test: codegen: skip catch-unwind on riscv64

    It isn't clear to me if this is a bug or not, hence the FIXME
    tblah committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    08529af View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    94605b9 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2020

  1. Configuration menu
    Copy the full SHA
    2764e54 View commit details
    Browse the repository at this point in the history
  2. Ignore windows in the test.

    pnkfelix committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    a9d5dff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    84e4777 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4d6a307 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2020

  1. Rollup merge of rust-lang#71796 - RalfJung:from-secs, r=nikomatsakis

    de-promote Duration::from_secs
    
    In rust-lang#67531, we removed the `rustc_promotable` attribute from a bunch of `Duration` methods, but not from `Duration::from_secs`. This makes the current list of promotable functions the following (courtesy of @ecstatic-morse):
    
    * `INT::min_value`, `INT::max_value`
    * `std::mem::size_of`, `std::mem::align_of`
    * `RangeInclusive::new` (backing `x..=y`)
    * `std::ptr::null`, `std::ptr::null_mut`
    * `RawWaker::new`, `RawWakerVTable::new` ???
    * `Duration::from_secs`
    
    I feel like the last one stands out a bit here -- the rest are all very core language primitives, and `RawWaker` has a strong motivation for getting a `'static` vtable. But a `&'static Duration`? That seems unlikely. So I propose we no longer promote calls to `Duration::from_secs`, which is what this PR does.
    
    rust-lang#67531 saw zero regressions and I am not aware of anyone complaining that this broke their (non-cratered) code, so I consider it likely the same will be true here, but of course we'd do a crater run.
    
    See [this document](https://github.com/rust-lang/const-eval/blob/master/promotion.md) for some more background on promotion and rust-lang/const-eval#19 for some of the concerns around promoting function calls.
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    b633e45 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#72708 - petrochenkov:linkhack, r=cuviper

    linker: Add a linker rerun hack for gcc versions not supporting -static-pie
    
    Which mirrors the existing `-no-pie` linker rerun hack, but the logic is a bit more elaborated in this case.
    
    If the linker (gcc or clang) errors on `-static-pie` we rerun in with `-static` instead.
    We must also replace CRT objects corresponding to `-static-pie` with ones corresponding to `-static` in this case.
    
    (One sanity check for CRT objects in target specs is also added as a drive-by fix.)
    
    To do in the future: refactor all linker rerun hacks into separate functions and share more code with `add_(pre,post)_link_objects`.
    
    This PR accompanies rust-lang#71804 and unblocks rust-lang#70740.
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    3c39683 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#72740 - estebank:recursive-indirection, r=m…

    …atthewjasper
    
    On recursive ADT, provide indirection structured suggestion
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    d4a4f16 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#72952 - pnkfelix:regression-test-for-issue-…

    …70924, r=nikomatsakis
    
    run-make regression test for issue rust-lang#70924.
    
    Sometime after my PR rust-lang#72767 (to fix issue rust-lang#70924) landed, I realized that I *could* make a local regression test, thanks to `rustc --print sysroot`: I can make a fresh "copy" (really mostly symlinks) of the sysroot, and then modify it to recreate the terms of this bug.
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    cfc78b3 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#72977 - tblah:riscv-codegen-llvm10, r=nikom…

    …atsakis
    
    Fix codegen tests for RISC-V
    
    Some codegen tests didn't seem relevant (e.g. unsupported annotations).
    
    The RISC-V abi tests were broken by LLVM 10, c872dcf fixes that (cc: @msizanoen1)
    
    I'm not sure about skipping catch-unwind.rs and included that change here mostly as a request for comment - I can't tell if that's a bug.
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    2a5529b View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#73007 - yoshuawuyts:socketaddr-from-string-…

    …u16, r=sfackler
    
    impl ToSocketAddrs for (String, u16)
    
    This adds a convenience impl of `ToSocketAddrs for (String, u16)`. When authoring HTTP services it's common to take command line options for `host` and `port` and parse them into `String` and `u16` respectively. Consider the following program:
    ```rust
    #[derive(Debug, StructOpt)]
    struct Config {
        host: String,
        port: u16,
    }
    
    async fn main() -> io::Result<()> {
        let config = Config::from_args();
        let stream = TcpStream::connect((&*config.host, config.port))?; // &* is not ideal
        // ...
    }
    ```
    
    Networking is a pretty common starting point for people new to Rust, and seeing `&*` in basic examples can be confusing. Even as someone that has experience with networking in Rust I tend to forget that `String` can't be passed directly there. Instead with this patch we can omit the `&*` conversion and pass `host` directly:
    ```rust
    #[derive(Debug, StructOpt)]
    struct Config {
        host: String,
        port: u16,
    }
    
    async fn main() -> io::Result<()> {
        let config = Config::from_args();
        let stream = TcpStream::connect((config.host, config.port))?; // no more conversions!
        // ...
    }
    ```
    
    I think should be an easy and small ergonomics improvement for networking. Thanks!
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    4aa73fc View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#73046 - marmeladema:save-analysis-fix-path,…

    … r=Xanewok
    
    save_analysis: fix some ICEs
    
    Fixes rust-lang#73020
    Fixes rust-lang#73022
    Fixes rust-lang#73041
    RalfJung authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    e9e7a61 View commit details
    Browse the repository at this point in the history