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

Fix ToImpl #1748

Merged
merged 2 commits into from
May 10, 2022
Merged

Fix ToImpl #1748

merged 2 commits into from
May 10, 2022

Conversation

rylev
Copy link
Contributor

@rylev rylev commented May 9, 2022

Fixes #1615

This changes the definition of ToImpl (now called AsImpl) to take &self and return a reference to the underlying impl. There's no reason for this to be unsafe as implementors can be sure that if they have a reference to an interface pointer, they can get a non-exclusive reference to underlying implementation.

@rylev rylev requested a review from kennykerr May 9, 2022 15:42
@rylev rylev merged commit d0c856b into microsoft:master May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: ToImpl::to_impl unlikely to ever be safe
3 participants