1. 19 5月, 2018 10 次提交
    • O
      Reintroduce some sanity checks · 76ddede5
      Oliver Schneider 提交于
      76ddede5
    • O
      Ensure that statics are always ByRef · 8b99c617
      Oliver Schneider 提交于
      8b99c617
    • B
      Auto merge of #50874 - nikomatsakis:nll-reset-unification, r=estebank · c95e1ccc
      bors 提交于
      use `reset_unifications` instead of creating new unification table
      
      This eliminates a hot spot in NLL performance.
      c95e1ccc
    • B
      Auto merge of #50744 - nikic:mutable-noalias, r=alexcrichton · bdace29d
      bors 提交于
      Emit noalias on &mut parameters by default
      
      This used to be disabled due to LLVM bugs in the handling of
      noalias information in conjunction with unwinding. However,
      according to #31681 all known LLVM bugs have been fixed by
      LLVM 6.0, so it's probably time to reenable this optimization.
      
      -Z no-mutable-noalias is left as an escape-hatch to debug problems
      suspected to stem from this change.
      bdace29d
    • B
      Auto merge of #50709 - alexcrichton:revert-musl, r=sfackler · 8319ef5b
      bors 提交于
      Revert #50105 until regression is fixed
      
      Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
      8319ef5b
    • B
      Auto merge of #50603 - eddyb:issue-49955, r=nikomatsakis · c6a1979e
      bors 提交于
       rustc_mir: allow promotion of promotable temps indexed at runtime.
      
      Fixes #49955.
      
      r? @nikomatsakis
      c6a1979e
    • B
      Auto merge of #50319 - nagisa:align_to, r=alexcrichton · 37a40917
      bors 提交于
      Implement [T]::align_to
      
      Note that this PR deviates from what is accepted by RFC slightly by making `align_offset` to return an offset in elements, rather than bytes. This is necessary to sanely support `[T]::align_to` and also simply makes more sense™. The caveat is that trying to align a pointer of ZST is now an equivalent to `is_aligned` check, rather than anything else (as no number of ZST elements will align a misaligned ZST pointer).
      
      It also implements the `align_to` slightly differently than proposed in the RFC to properly handle cases where size of T and U aren’t co-prime.
      
      Furthermore, a promise is made that the slice containing `U`s will be as large as possible (contrary to the RFC) – otherwise the function is quite useless.
      
      The implementation uses quite a few underhanded tricks and takes advantage of the fact that alignment is a power-of-two quite heavily to optimise the machine code down to something that results in as few known-expensive instructions as possible. Currently calling `ptr.align_offset` with an unknown-at-compile-time `align` results in code that has just a single "expensive" modulo operation; the rest is "cheap" arithmetic and bitwise ops.
      
      cc https://github.com/rust-lang/rust/issues/44488 @oli-obk
      
      As mentioned in the commit message for align_offset, many thanks go to Chris McDonald.
      37a40917
    • N
    • B
      Auto merge of #50697 - KiChjang:issue-50461, r=pnkfelix · 952f344c
      bors 提交于
      Use EverInit instead of MaybeInit to determine initialization
      
      Fixes #50461.
      Fixes #50463.
      952f344c
    • B
      Auto merge of #50653 - oli-obk:bad_const, r=cramertj · a722296b
      bors 提交于
      Make the `const_err` lint `deny`-by-default
      
      At best these things are runtime panics (debug mode) or overflows (release mode). More likely they are public constants that are unused in the crate declaring them.
      
      This is not a breaking change, as dependencies won't break and root crates can `#![warn(const_err)]`, though I don't know why anyone would do that.
      a722296b
  2. 18 5月, 2018 30 次提交