Skip to content

regression: borrowed data escapes outside of the method #127342

Closed
@Mark-Simulacrum

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]     |                                       ^^^^^^^^^

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