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-compiler
    regression-from-stable-to-beta
    E-needs-bisection
    on Jul 4, 2024
  2. added this to the 1.80.0 milestone on Jul 4, 2024
  3. added
    I-prioritize
    needs-triage
    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-types
    and removed
    needs-triage
    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-high
    and removed
    I-prioritize
    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-bisectionP-highT-compilerT-typesregression-from-stable-to-beta

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions