1. 07 9月, 2021 1 次提交
  2. 15 8月, 2021 1 次提交
  3. 02 5月, 2021 2 次提交
  4. 20 4月, 2021 1 次提交
  5. 03 4月, 2021 2 次提交
  6. 31 3月, 2021 1 次提交
  7. 27 3月, 2021 1 次提交
  8. 19 3月, 2021 1 次提交
    • J
      Replace closures_captures and upvar_capture with closure_min_captures · 52dba13e
      Jennifer Wills 提交于
      make changes to liveness to use closure_min_captures
      
      use different span
      
      borrow check uses new structures
      
      rename to CapturedPlace
      
      stop using upvar_capture in regionck
      
      remove the bridge
      
      cleanup from rebase + remove the upvar_capture reference from mutability_errors.rs
      
      remove line from livenes test
      
      make our unused var checking more consistent
      
      update tests
      
      adding more warnings to the tests
      
      move is_ancestor_or_same_capture to rustc_middle/ty
      
      update names to reflect the closures
      
      add FIXME
      
      check that all captures are immutable borrows before returning
      
      add surrounding if statement like the original
      
      move var out of the loop and rename
      Co-authored-by: NLogan Mosier <logmosier@gmail.com>
      Co-authored-by: NRoxane Fruytier <roxane.fruytier@hotmail.com>
      52dba13e
  9. 12 3月, 2021 1 次提交
  10. 30 1月, 2021 1 次提交
  11. 17 1月, 2021 1 次提交
  12. 03 1月, 2021 1 次提交
  13. 30 12月, 2020 1 次提交
  14. 19 12月, 2020 1 次提交
  15. 11 11月, 2020 1 次提交
  16. 11 9月, 2020 1 次提交
    • A
      Note when a a move/borrow error is caused by a deref coercion · d18b4bb7
      Aaron Hill 提交于
      Fixes #73268
      
      When a deref coercion occurs, we may end up with a move error if the
      base value has been partially moved out of. However, we do not indicate
      anywhere that a deref coercion is occuring, resulting in an error
      message with a confusing span.
      
      This PR adds an explicit note to move errors when a deref coercion is
      involved. We mention the name of the type that the deref-coercion
      resolved to, as well as the `Deref::Target` associated type being used.
      d18b4bb7
  17. 10 9月, 2020 1 次提交
  18. 07 9月, 2020 1 次提交
    • A
      Add CONST_ITEM_MUTATION lint · f422ef14
      Aaron Hill 提交于
      Fixes #74053
      Fixes #55721
      
      This PR adds a new lint `CONST_ITEM_MUTATION`.
      Given an item `const FOO: SomeType = ..`, this lint fires on:
      
      * Attempting to write directly to a field (`FOO.field = some_val`) or
        array entry (`FOO.array_field[0] = val`)
      * Taking a mutable reference to the `const` item (`&mut FOO`), including
        through an autoderef `FOO.some_mut_self_method()`
      
      The lint message explains that since each use of a constant creates a
      new temporary, the original `const` item will not be modified.
      f422ef14
  19. 04 9月, 2020 1 次提交
  20. 30 8月, 2020 1 次提交
  21. 26 8月, 2020 1 次提交
    • A
      Point to a move-related span when pointing to closure upvars · b5b8b932
      Aaron Hill 提交于
      Fixes #75904
      
      When emitting move/borrow errors, we may point into a closure to
      indicate why an upvar is used in the closure. However, we use the
      'upvar span', which is just an arbitrary usage of the upvar. If the
      upvar is used in multiple places (e.g. a borrow and a move), we may end
      up pointing to the borrow. If the overall error is a move error, this
      can be confusing.
      
      This PR tracks the span that caused an upvar to become captured by-value
      instead of by-ref (assuming that it's not a `move` closure). We use this
      span instead of the 'upvar' span when we need to point to an upvar usage
      during borrow checking.
      b5b8b932
  22. 13 8月, 2020 1 次提交
  23. 09 8月, 2020 1 次提交
    • A
      Be consistent when describing a move as a 'partial' in diagnostics · 5f7436b5
      Aaron Hill 提交于
      When an error occurs due to a partial move, we would use the world
      "partial" in some parts of the error message, but not in others. This
      commit ensures that we use the word 'partial' in either all or none of
      the diagnostic messages.
      
      Additionally, we no longer describe a move out of a `Box` via `*` as
      a 'partial move'. This was a pre-existing issue, but became more
      noticable when the word 'partial' is used in more places.
      5f7436b5
  24. 08 8月, 2020 1 次提交
  25. 17 7月, 2020 1 次提交
  26. 27 6月, 2020 1 次提交
  27. 25 6月, 2020 1 次提交
    • E
      Provide suggestions for some moved value errors · 520461f1
      Esteban Küber 提交于
      When encountering an used moved value where the previous move happened
      in a `match` or `if let` pattern, suggest using `ref`. Fix #63988.
      
      When encountering a `&mut` value that is used in multiple iterations of
      a loop, suggest reborrowing it with `&mut *`. Fix #62112.
      520461f1
  28. 23 6月, 2020 1 次提交
  29. 12 6月, 2020 3 次提交
  30. 25 5月, 2020 1 次提交
  31. 06 5月, 2020 1 次提交
  32. 28 4月, 2020 1 次提交
  33. 24 4月, 2020 2 次提交
  34. 23 4月, 2020 1 次提交
  35. 19 4月, 2020 1 次提交