-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Implement MaybeDangling compiler support
#150447
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
base: main
Are you sure you want to change the base?
Implement MaybeDangling compiler support
#150447
Conversation
24f36ff to
aebfd56
Compare
aebfd56 to
63e07cf
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have a comment explaining what we are checking here: the absence of dereferenceable and noalias
| // FIXME: what is the exact effect of maybe dangling? | ||
| Self::ty_and_layout_pointee_info_at(this.field(cx, 0), cx, offset) | ||
| .map(|info| PointeeInfo { safe: None, ..info }) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also reset the size to 0, that's how we encode dereferenceable.
Odd that the test does not catch this...
cc @RalfJung