Skip to content

regression: borrowed data escapes outside of the method #127342

Closed

Description

@Mark-Simulacrum
[INFO] [stdout] error[E0521]: borrowed data escapes outside of method
[INFO] [stdout]    --> src/geometries/contour/difference.rs:377:43
[INFO] [stdout]     |
[INFO] [stdout] 363 |       fn difference(self, other: &Polygon<Scalar>) -> Self::Output {
[INFO] [stdout]     |                           -----  - let's call the lifetime of this reference `'2`
[INFO] [stdout]     |                           |
[INFO] [stdout]     |                           `other` is a reference that is only valid in the method body
[INFO] [stdout] ...
[INFO] [stdout] 377 |           let boxes_have_common_continuum = to_boxes_have_common_continuum(
[INFO] [stdout]     |  ___________________________________________^
[INFO] [stdout] 378 | |             &bounding_boxes,
[INFO] [stdout] 379 | |             &other_bounding_box,
[INFO] [stdout] 380 | |         );
[INFO] [stdout]     | |         ^
[INFO] [stdout]     | |         |
[INFO] [stdout]     | |_________`other` escapes the method body here
[INFO] [stdout]     |           argument requires that `'2` must outlive `'static`
[INFO] [stdout]     |
[INFO] [stdout] note: due to current limitations in the borrow checker, this implies a `'static` lifetime
[INFO] [stdout]    --> src/operations.rs:565:39
[INFO] [stdout]     |
[INFO] [stdout] 565 |     for<'a> &'a bounded::Box<Scalar>: Relatable,
[INFO] [stdout]     |                                       ^^^^^^^^^

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    on Jul 4, 2024
  2. added this to the 1.80.0 milestone on Jul 4, 2024
  3. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 4, 2024
  4. compiler-errors commented on Jul 4, 2024

    @compiler-errors
    Contributor

    This is (also) #119820, cc @lcnr (though we probably already have this listed as a regression in that one)

  5. added
    T-typesRelevant to the types team, which will review and decide on the PR/issue.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 4, 2024
  6. apiraino commented on Jul 5, 2024

    @apiraino
    Contributor

    By reading this comment in #119820 I infer that we accepted that change but we wanted to fix all crates regressions before the release.

    I'll tentatively assign a P-high (if my understanding is correct).

    WG-prioritization assigning priority (Zulip discussion).

    @rustbot label -I-prioritize +P-high

  7. added
    P-highHigh priority
    and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jul 5, 2024
  8. lqd commented on Jul 5, 2024

    @lqd
    Member

    but we wanted to fix all crates regressions before the release.

    This crate was indeed already fixed in lycantropos/rene#5, and this released crates.io version doesn't contain the fix.

  9. apiraino commented on Jul 18, 2024

    @apiraino
    Contributor

    Note to self: I think this issue can be closed but waiting for consensus

  10. lcnr commented on Jul 18, 2024

    @lcnr
    Contributor

    the breakage has been reverted entirely now, so regardless of the fix, this will continue to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions