1. 28 2月, 2017 1 次提交
  2. 26 2月, 2017 1 次提交
  3. 25 2月, 2017 1 次提交
  4. 24 2月, 2017 1 次提交
  5. 19 2月, 2017 1 次提交
  6. 18 2月, 2017 1 次提交
  7. 28 1月, 2017 1 次提交
  8. 26 1月, 2017 1 次提交
  9. 25 1月, 2017 1 次提交
  10. 16 1月, 2017 1 次提交
  11. 07 1月, 2017 1 次提交
  12. 28 12月, 2016 1 次提交
  13. 07 12月, 2016 1 次提交
  14. 06 12月, 2016 1 次提交
  15. 30 11月, 2016 1 次提交
  16. 29 11月, 2016 1 次提交
  17. 28 11月, 2016 2 次提交
  18. 22 11月, 2016 1 次提交
    • G
      Implement the `loop_break_value` feature. · 9d42549d
      Geoffry Song 提交于
      This implements RFC 1624, tracking issue #37339.
      
      - `FnCtxt` (in typeck) gets a stack of `LoopCtxt`s, which store the
        currently deduced type of that loop, the desired type, and a list of
        break expressions currently seen. `loop` loops get a fresh type
        variable as their initial type (this logic is stolen from that for
        arrays). `while` loops get `()`.
      - `break {expr}` looks up the broken loop, and unifies the type of
        `expr` with the type of the loop.
      - `break` with no expr unifies the loop's type with `()`.
      - When building MIR, `loop` loops no longer construct a `()` value at
        termination of the loop; rather, the `break` expression assigns the
        result of the loop. `while` loops are unchanged.
      - `break` respects contexts in which expressions may not end with braced
        blocks. That is, `while break { break-value } { while-body }` is
        illegal; this preserves backwards compatibility.
      - The RFC did not make it clear, but I chose to make `break ()` inside
        of a `while` loop illegal, just in case we wanted to do anything with
        that design space in the future.
      
      This is my first time dealing with this part of rustc so I'm sure
      there's plenty of problems to pick on here ^_^
      9d42549d
  19. 21 11月, 2016 1 次提交
  20. 13 11月, 2016 1 次提交
  21. 02 11月, 2016 2 次提交
  22. 28 10月, 2016 1 次提交
  23. 27 10月, 2016 1 次提交
  24. 05 10月, 2016 2 次提交
  25. 04 10月, 2016 1 次提交
  26. 29 9月, 2016 1 次提交
  27. 21 9月, 2016 2 次提交
  28. 09 9月, 2016 1 次提交
  29. 04 9月, 2016 1 次提交
  30. 03 9月, 2016 2 次提交
  31. 27 8月, 2016 1 次提交
  32. 13 8月, 2016 4 次提交