1. 24 1月, 2018 4 次提交
    • B
      Auto merge of #47299 - cramertj:unsafe-placer, r=alexcrichton · 9758ff9c
      bors 提交于
      Make core::ops::Place an unsafe trait
      
      Consumers of `Place` would reasonably expect that the `pointer` function returns a valid pointer to memory that can actually be written to.
      9758ff9c
    • B
      Auto merge of #46931 - clarcharr:float_bits_core, r=alexcrichton · a538fe7c
      bors 提交于
      Expose float from_bits and to_bits in libcore.
      
      These methods have no dependencies on libm and thus should be offered in libcore.
      a538fe7c
    • B
      Auto merge of #45337 - Zoxc:gen-static, r=nikomatsakis · fdecb056
      bors 提交于
      Immovable generators
      
      This adds support for immovable generators which allow you to borrow local values inside generator across suspension points. These are declared using a `static` keyword:
      ```rust
      let mut generator = static || {
          let local = &Vec::new();
          yield;
          local.push(0i8);
      };
      generator.resume();
      
      // ERROR moving the generator after it has resumed would invalidate the interior reference
      // drop(generator);
      ```
      
      Region inference is no longer affected by the types stored in generators so the regions inside should be similar to other code (and unaffected by the presence of `yield` expressions). The borrow checker is extended to pick up the slack so interior references still result in errors for movable generators. This fixes #44197, #45259 and #45093.
      
      This PR depends on [PR #44917 (immovable types)](https://github.com/rust-lang/rust/pull/44917), I suggest potential reviewers ignore the first commit as it adds immovable types.
      fdecb056
    • B
      Auto merge of #47678 - kennytm:rollup, r=kennytm · 4e3901d3
      bors 提交于
      Rollup of 14 pull requests
      
      - Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672
      - Failed merges:
      4e3901d3
  2. 23 1月, 2018 34 次提交
  3. 22 1月, 2018 2 次提交