Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: borrowed data escapes outside of the method #127342

Closed
Mark-Simulacrum opened this issue Jul 4, 2024 · 5 comments
Closed

regression: borrowed data escapes outside of the method #127342

Mark-Simulacrum opened this issue Jul 4, 2024 · 5 comments
Labels
E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

[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]     |                                       ^^^^^^^^^
@Mark-Simulacrum Mark-Simulacrum added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc labels Jul 4, 2024
@Mark-Simulacrum Mark-Simulacrum added this to the 1.80.0 milestone Jul 4, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 4, 2024
@compiler-errors
Copy link
Member

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

@saethlin saethlin added T-types Relevant to the types team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 4, 2024
@apiraino
Copy link
Contributor

apiraino commented Jul 5, 2024

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

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jul 5, 2024
@lqd
Copy link
Member

lqd commented Jul 5, 2024

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.

@apiraino
Copy link
Contributor

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

@lcnr
Copy link
Contributor

lcnr commented Jul 18, 2024

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

@lcnr lcnr closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants