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

Add some safety comments #4288

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

Manishearth
Copy link
Member

Caught during unsafe review

@@ -148,7 +148,11 @@ impl LocaleFallbacker {
parents: crate::provider::Baked::SINGLETON_FALLBACK_PARENTS_V1,
collation_supplement: Some(crate::provider::Baked::SINGLETON_FALLBACK_SUPPLEMENT_CO_V1),
};
// Shitty covariance because the zeromaps confuse the compiler
// Safety: we're transmuting down from LocaleFallbackerBorrowed<'static> to LocaleFallbackerBorrowed<'a>
Copy link
Member

Choose a reason for hiding this comment

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

wait, you think my comment wasn't accurate enough 😀 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

trying to make it understandable for people less familiar with this stuff

Copy link
Member

Choose a reason for hiding this comment

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

I understand, this was meant as a light-hearted joke

@Manishearth Manishearth reopened this Nov 14, 2023
@Manishearth Manishearth merged commit 62ccc20 into unicode-org:main Nov 14, 2023
53 of 55 checks passed
@Manishearth Manishearth deleted the safety-cmt branch November 14, 2023 22:21
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.

3 participants