1. 04 12月, 2017 1 次提交
    • N
      replace constant regions with a post-inference check · a96b0cf8
      Niko Matsakis 提交于
      Rather than declaring some region variables to be constant, and
      reporting errors when they would have to change, we instead populate
      each free region X with a minimal set of points (the CFG plus end(X)),
      and then we let inference do its thing. This may add other `end(Y)`
      points into X; we can then check after the fact that indeed `X: Y`
      holds.
      
      This requires a bit of "blame" detection to find where the bad
      constraint came from: we are currently using a pretty dumb
      algorithm. Good place for later expansion.
      a96b0cf8
  2. 18 11月, 2017 1 次提交
    • T
      Fix impl Trait Lifetime Handling · bc4810d9
      Taylor Cramer 提交于
      After this change, impl Trait existentials are
      desugared to a new `abstract type` definition
      paired with a set of lifetimes to apply.
      
      In-scope generics are included as parents of the
      `abstract type` generics. Parent regions are
      replaced with static, and parent regions
      referenced in the `impl Trait` type are duplicated
      at the end of the `abstract type`'s generics.
      bc4810d9
  3. 16 11月, 2017 1 次提交
  4. 02 11月, 2017 1 次提交
  5. 25 9月, 2017 1 次提交
    • E
      Point at parameter type on E0301 · ddee9fbc
      Esteban Küber 提交于
      On "the parameter type `T` may not live long enough" error, point to the
      parameter type suggesting lifetime bindings:
      
      ```
      error[E0310]: the parameter type `T` may not live long enough
        --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5
         |
      27 | struct Foo<T> {
         |            - help: consider adding an explicit lifetime bound `T: 'static`...
      28 |     foo: &'static T
         |     ^^^^^^^^^^^^^^^
         |
      note: ...so that the reference type `&'static T` does not outlive the data it points at
        --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5
         |
      28 |     foo: &'static T
         |     ^^^^^^^^^^^^^^^
      ```
      ddee9fbc
  6. 11 9月, 2017 1 次提交
  7. 02 9月, 2017 1 次提交
  8. 17 6月, 2017 1 次提交
  9. 13 5月, 2017 3 次提交
  10. 01 5月, 2017 4 次提交
    • T
      introduce per-fn RegionMaps · 73cd9bde
      Taylor Cramer 提交于
      Instead of requesting the region maps for the entire crate, request for
      a given item etc. Several bits of code were modified to take
      `&RegionMaps` as input (e.g., the `resolve_regions_and_report_errors()`
      function). I am not totally happy with this setup -- I *think* I'd
      rather have the region maps be part of typeck tables -- but at least the
      `RegionMaps` works in a "parallel" way to `FreeRegionMap`, so it's not
      too bad. Given that I expect a lot of this code to go away with NLL, I
      didn't want to invest *too* much energy tweaking it.
      73cd9bde
    • N
      intern CodeExtents · c7dc39db
      Niko Matsakis 提交于
      Make a `CodeExtent<'tcx>` be something allocated in an arena
      instead of an index into the `RegionMaps`.
      c7dc39db
    • N
      remove ROOT_CODE_EXTENT and DUMMY_CODE_EXTENT · 55d6066c
      Niko Matsakis 提交于
      Instead, thread around `Option<CodeExtent>` where applicable.
      55d6066c
    • T
      On-demandify region mapping · eff39b73
      Taylor Cramer 提交于
      eff39b73
  11. 12 4月, 2017 2 次提交
  12. 28 2月, 2017 1 次提交
  13. 01 9月, 2016 1 次提交
  14. 27 8月, 2016 1 次提交
  15. 11 5月, 2016 4 次提交
  16. 03 5月, 2016 1 次提交
  17. 07 4月, 2016 1 次提交
  18. 01 4月, 2016 1 次提交
  19. 27 3月, 2016 1 次提交
  20. 03 3月, 2016 1 次提交
  21. 05 10月, 2015 1 次提交
  22. 14 9月, 2015 1 次提交
  23. 25 8月, 2015 3 次提交
    • A
      fix test · 581e5ee4
      Ariel Ben-Yehuda 提交于
      581e5ee4
    • A
      store the CodeExtent directly in FreeRegion · 65e9bc0c
      Ariel Ben-Yehuda 提交于
      this makes the code cleaner
      65e9bc0c
    • A
      Use a Vec instead of an HashMap for the scope hierarchy · fc304384
      Ariel Ben-Yehuda 提交于
      This increases regionck performance greatly - type-checking on
      librustc decreased from 9.1s to 8.1s. Because of Amdahl's law,
      total performance is improved only by about 1.5% (LLVM wizards,
      this is your opportunity to shine!).
      
      before:
      576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k
      after:
      566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k
      
      I am somewhat worried really need to find out why we have this Red Queen's
      Race going on here. Originally I suspected it may be a problem from RFC1214's
      warnings, but it seems to be an effect from other changes.
      
      However, the increase seems to be mostly in LLVM's time, so I guess
      it's the LLVM wizards' problem.
      fc304384
  24. 22 8月, 2015 3 次提交
  25. 21 8月, 2015 1 次提交
  26. 19 8月, 2015 1 次提交
  27. 13 8月, 2015 1 次提交