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

Improvements to unsafe trait support #156

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Conversation

lqd
Copy link
Member

@lqd lqd commented Nov 12, 2023

This PR contains the few improvements discussed in review of #128 (but has already been merged, hence this new PR):

  • I initially customized Safety's Debug impl to special-case the default value and print nothing. That was unnecessary after the recent parser changes and the pretty-printing fix cherry-picked in that PR: it ended up being similar to the default derived Debug impl for #[term]s, and can be removed.
  • re-introduces the struct pattern in check_trait_impl for better errors if the struct is modified.
  • introduces the same pattern for check_neg_trait_impl for the same reason.

@lqd lqd changed the title Improvements on unsafe trait support Improvements to unsafe trait support Nov 12, 2023
@nikomatsakis nikomatsakis merged commit 3468054 into rust-lang:main Nov 14, 2023
3 checks passed
@lqd lqd deleted the unsafer-traits branch November 14, 2023 11:39
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.

2 participants