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

Hide unsafe #28

Merged
merged 2 commits into from
Sep 20, 2021
Merged

Hide unsafe #28

merged 2 commits into from
Sep 20, 2021

Conversation

Jake-Shadle
Copy link
Member

Resolves: #27

@Jake-Shadle Jake-Shadle merged commit 689e978 into main Sep 20, 2021
@Jake-Shadle Jake-Shadle deleted the hide-unsafe branch September 20, 2021 07:51
#[allow(clippy::not_unsafe_ptr_arg_deref)]
fn try_from(diag: *mut diagnostics::Diagnostic) -> Result<Self, Self::Error> {
impl Diagnostic {
pub(crate) fn from_diag(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be an unsafe fn, if the caller is responsible for guaranteeing validity of the incoming pointer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed in a7f201c

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.

Public API of spirv-tools exposes UB to safe code
2 participants