1. 05 Apr, 2019 17 commits
  2. 04 Apr, 2019 23 commits
    • Alex Crichton's avatar
      wasm32: Default to a "static" relocation model · 471db2b8
      Alex Crichton authored
      LLVM 9 is adding support for a "pic" relocation model for wasm code,
      which is quite different than the current model. In order to preserve
      the mode of compilation that we have today default to "static" to ensure
      that we don't accidentally start creating experimental relocatable
      binaries.
      471db2b8
    • Alex Crichton's avatar
      ci: Update FreeBSD tarball downloads · fcc8b8ce
      Alex Crichton authored
      These appear to have disappeared from the original server, so I acquired
      the contents from a different mirror and uploaded them to our S3 bucket
      fcc8b8ce
    • Masaki Hara's avatar
      Add ignore to doc code · 7a63c7f0
      Masaki Hara authored
      7a63c7f0
    • Masaki Hara's avatar
      Simplify fnbox docs. · 440e873a
      Masaki Hara authored
      440e873a
    • CrLF0710's avatar
      Stabilize boxed_closure_impls in 1.35.0. · ecc3e89d
      CrLF0710 authored
      ecc3e89d
    • Masaki Hara's avatar
    • Masaki Hara's avatar
      We already have unsized_locals in stage0. · a38f2927
      Masaki Hara authored
      a38f2927
    • Masaki Hara's avatar
      Fix failing tests. · 4dcd6cc2
      Masaki Hara authored
      4dcd6cc2
    • Masaki Hara's avatar
      e55d82c8
    • Masaki Hara's avatar
    • Masaki Hara's avatar
      Add tests for boxed_closure_impls. · 480dcb40
      Masaki Hara authored
      480dcb40
    • Masaki Hara's avatar
      Add Fn* blanket impls for Box. · 059ec76d
      Masaki Hara authored
      059ec76d
    • Masaki Hara's avatar
      Make FnBox a subtrait of FnOnce. · 79941973
      Masaki Hara authored
      79941973
    • Alex Crichton's avatar
      std: Upgrade `compiler_builtins` to fix wasi linkage · 1bf04c9a
      Alex Crichton authored
      Turns out we needed to exclude a number of math functions on the
      `wasm32-unknown-wasi` target, and this was fixed in 0.1.9 of
      compiler-builtins and this is pulling in the fix to libstd's own build.
      1bf04c9a
    • bors's avatar
      Auto merge of #59676 - alexcrichton:osx-deadlock, r=sfackler · 53f2165c
      bors authored
      std: Avoid usage of `Once` in `Instant`
      
      This commit removes usage of `Once` from the internal implementation of
      time utilities on OSX and Windows. It turns out that we accidentally hit
      a deadlock today (#59020) via events that look like:
      
      * A thread invokes `park_timeout`
      * Internally, only on OSX, `park_timeout` calls `Instant::elapsed`
      * Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize
        global timer data
      * Inside of `Once`, it attempts to `park`
      
      This means on the same stack frame, when there's contention, we're
      calling `park` from inside `park_timeout`, causing a deadlock!
      
      The solution implemented in this commit was to remove usage of `Once`
      and instead just do a small dance with atomics. There's no real need we
      need to guarantee that the global information is only learned once, only
      that it's only *stored* once. This implementation may have multiple
      threads invoke `mach_timebase_info`, but only one will store the global
      information which will amortize the cost for all other threads.
      
      A similar fix has been applied to windows to be uniform across our
      implementations, but looking at the code on Windows no deadlock was
      possible. This is purely just a consistency update for Windows and in
      theory a slightly leaner implementation.
      
      Closes #59020
      53f2165c
    • David Tolnay's avatar
      Update cargo · d6b91fe1
      David Tolnay authored
      d6b91fe1
    • hgallagher1993's avatar
    • bors's avatar
      Auto merge of #59695 - Centril:rollup-88qffc2, r=Centril · 52980d0f
      bors authored
      Rollup of 8 pull requests
      
      Successful merges:
      
       - #59470 (Document std::fs::File close behavior ignoring errors)
       - #59555 (update miri)
       - #59556 (update stdsimd)
       - #59596 (Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl)
       - #59639 (Never return uninhabited values at all)
       - #59671 (Make some of lexer's API private)
       - #59685 (Add description for -Os and -Oz in rustc.1)
       - #59686 (Temporarily disable stack probing for gnux32.)
      
      Failed merges:
      
      r? @ghost
      52980d0f
    • Alex Crichton's avatar
      std: Avoid usage of `Once` in `Instant` · cb57484d
      Alex Crichton authored
      This commit removes usage of `Once` from the internal implementation of
      time utilities on OSX and Windows. It turns out that we accidentally hit
      a deadlock today (#59020) via events that look like:
      
      * A thread invokes `park_timeout`
      * Internally, only on OSX, `park_timeout` calls `Instant::elapsed`
      * Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize
        global timer data
      * Inside of `Once`, it attempts to `park`
      
      This means on the same stack frame, when there's contention, we're
      calling `park` from inside `park_timeout`, causing a deadlock!
      
      The solution implemented in this commit was to remove usage of `Once`
      and instead just do a small dance with atomics. There's no real need we
      need to guarantee that the global information is only learned once, only
      that it's only *stored* once. This implementation may have multiple
      threads invoke `mach_timebase_info`, but only one will store the global
      information which will amortize the cost for all other threads.
      
      A similar fix has been applied to windows to be uniform across our
      implementations, but looking at the code on Windows no deadlock was
      possible. This is purely just a consistency update for Windows and in
      theory a slightly leaner implementation.
      
      Closes #59020
      cb57484d
    • Mazdak Farrokhzad's avatar
      Rollup merge of #59686 - crlf0710:disable_gnux32_stackprobe, r=luqmana · 31c2f5d2
      Mazdak Farrokhzad authored
      Temporarily disable stack probing for gnux32.
      31c2f5d2
    • Mazdak Farrokhzad's avatar
      Rollup merge of #59685 - lzutao:patch-1, r=GuillaumeGomez · 4954cae2
      Mazdak Farrokhzad authored
      Add description for -Os and -Oz in rustc.1
      4954cae2
    • Mazdak Farrokhzad's avatar
      Rollup merge of #59671 - matklad:lexer, r=eddyb · c18c1945
      Mazdak Farrokhzad authored
      Make some of lexer's API private
      
      Lexer is a `pub` type, so it feels wrong that its fields are just pub (I guess it wasn't exported initially), so let's minimize visibility.
      
      Context: I am looking into extracting rust-lexer into a library, which can be shared by rust-analyzer and rustc. I hope that a simple interface like `fn next_token(src: &str) -> (TokenKind, usize)` would work, but to try this out I need to understand what is the current API of the lexer.
      c18c1945
    • Mazdak Farrokhzad's avatar
      Rollup merge of #59639 - cuviper:ignore-uninhabited, r=eddyb · 05c31baf
      Mazdak Farrokhzad authored
      Never return uninhabited values at all
      
      Functions with uninhabited return values are already marked `noreturn`,
      but we were still generating return instructions for this. When running
      with `-C passes=lint`, LLVM prints:
      
          Unusual: Return statement in function with noreturn attribute
      
      The LLVM manual makes a stronger statement about `noreturn` though:
      
      > This produces undefined behavior at runtime if the function ever does
      dynamically return.
      
      We now emit an `abort` anywhere that would have tried to return an
      uninhabited value.
      
      Fixes #48227
      cc #7463 #48229
      
      r? @eddyb
      05c31baf