1. 20 7月, 2017 1 次提交
  2. 19 7月, 2017 7 次提交
    • B
      Auto merge of #43333 - Mark-Simulacrum:appveyor-fix, r=alexcrichton · 344f01cf
      bors 提交于
      Attempt to fix appveyor
      
      This will fix the problem, I think, but I don't know that this is a good idea (potentially leaving ourselves open to attackers, I guess, if a cert was revoked...). Of course, it may not. I don't actually have windows to check on..
      
      r? @alexcrichton
      344f01cf
    • M
      Attempt to fix appveyor · 3fe57217
      Mark Simulacrum 提交于
      3fe57217
    • E
      Implement const fn {size,align}_of. · 148718b4
      Eduard-Mihai Burtescu 提交于
      148718b4
    • B
      Auto merge of #43170 - kyrias:full-relro, r=alexcrichton · 4e56bbeb
      bors 提交于
      Add support for full RELRO
      
      This commit adds support for full RELRO, and enables it for the
      platforms I know have support for it.
      
      Full RELRO makes the PLT+GOT data read-only on startup, preventing it
      from being overwritten.
      
      http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html
      
      Fixes rust-lang/rust#29877.
      
      ---
      
      I'm not entirely certain if this is the best way to do it, but I figured mimicking the way it's done for PIE seemed like a good start at least.  I'm not sure whether we want to have it enabled by default globally and then disabling it explicitly for targets that don't support it though.  I'm also not sure whether the `full_relro` function should call `bug!()` or something like it for linkers that don't support it rather than no-opping.
      4e56bbeb
    • B
      Auto merge of #43168 - pnkfelix:check-attr-gating, r=aturon · 88e2c396
      bors 提交于
      Slew of builtin-attribute gating tests
      
      Slew of builtin-attribute "gating" tests for issue #43106.
      
      Some stray observations:
      
       * I don't know if its a good thing that so many attributes allow inputs which are silently discarded. (I  made heavy use of that in writing my tests, but that was more out of curiosity than necessity.)
       * The difference between crate-level and non-crate-level behavior is quite significant in some cases. Definitely worth making sure one has tests for both cases. (Not as clear whether it was worthwhile trying the various other AST forms like `fn f()` vs `struct S;`)
       * `#[no_builtins]` and `#[no_mangle]` occur twice on the `BUILTIN_ATTRIBUTES` list. Thats almost certainly a bug. (Filed as #43148)
       * We are maximally liberal in what we allow for `#[test]` and `#[bench]` when one compiles without `--test`.
       * We allow `#[no_mangle]` on arbitrary AST nodes, but only warn about potential misuse on `fn`
       * We allow `#[cold]`, `#[must_use]`, `#[windows_subsystem]`, and `#[no_builtins]` on arbitrary AST nodes. I don't know off-hand what the semantics are for e.g. a `#[cold] type T = ...;`
       * We allow crate-level `#![inline]`. That's probably a bug since its otherwise restricted to `fn` items
      88e2c396
    • B
      Auto merge of #40989 - matklad:comma-arms, r=petrochenkov · 83c36219
      bors 提交于
      Unify rules about commas in match arms and semicolons in expressions
      
      Original discussion: https://internals.rust-lang.org/t/syntax-of-block-like-expressions-in-match-arms/5025/7.
      
      Currently, rust uses different rules to determine if `,` is needed after an expression in a match arm and if `;` is needed in an expression statement:
      
      ```Rust
      fn stmt() {
          # no need for semicolons
          { () }
          if true { () } else { () }
          loop {}
          while true {}
      }
      
      fn match_arm(n: i32) {
          match n {
              1 => { () } # can omit comma here
              2 => if true { () } else { () }, # but all other cases do need commas.
              3 => loop { },
              4 => while true {},
              _ => ()
          }
      }
      ```
      
      This seems weird: why would you want to require `,` after and `if`?
      
      This PR unifies the rules. It is backwards compatible because it allows strictly more programs.
      83c36219
    • B
      Auto merge of #43316 - Mark-Simulacrum:rollup, r=Mark-Simulacrum · af049cd0
      bors 提交于
      Rollup of 11 pull requests
      
      - Successful merges: #42837, #43282, #43287, #43290, #43292, #43294, #43304, #43310, #43312, #43314, #43315
      - Failed merges:
      af049cd0
  3. 18 7月, 2017 32 次提交