Skip to content

liquidfun beta regression #44447

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

Closed
est31 opened this issue Sep 9, 2017 · 4 comments
Closed

liquidfun beta regression #44447

est31 opened this issue Sep 9, 2017 · 4 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@est31
Copy link
Member

est31 commented Sep 9, 2017

The liquidfun crate version 0.8.0 fails to build on latest beta 1.21, while the build works on stable. The error output (full log):

error[E0106]: missing lifetime specifier
   --> src/box2d/dynamics/body.rs:110:49
    |
110 |     fn b2Body_GetPosition(this: *mut B2Body) -> &Vec2;
    |                                                 ^ expected lifetime parameter
    |
    = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments
    = help: consider giving it an explicit bounded or 'static lifetime

cc @rjanicek

@retep998 retep998 added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Sep 9, 2017
@est31
Copy link
Member Author

est31 commented Sep 9, 2017

Bisected to e40dc66 -- #43651 cc @petrochenkov @eddyb

@est31
Copy link
Member Author

est31 commented Sep 9, 2017

Minimal reproducing example:

extern {
    fn foo(this: *mut u8) -> &u32;
}

@arielb1
Copy link
Contributor

arielb1 commented Sep 11, 2017

I believe this is intentional.

@arielb1 arielb1 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 11, 2017
@alexcrichton alexcrichton added this to the 1.21 milestone Sep 13, 2017
@nikomatsakis nikomatsakis added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 14, 2017
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Sep 14, 2017

This is a bug-fix, so closing as "behaving as expected". In particular, the elision rules specify that references in return types are supposed to have explicit lifetimes unless they can take their lifetime from the function parameters -- as there are no references in the function parameter list, then this is an error. (Also, we did a clean cargobomb run here, so this doesn't seem like a widespread problem.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants