Skip to content

Add section on impl existence reasoning - #2

Merged
Manishearth merged 1 commit into
google:mainfrom
nia-e:main
Aug 21, 2026
Merged

Add section on impl existence reasoning#2
Manishearth merged 1 commit into
google:mainfrom
nia-e:main

Conversation

@nia-e

@nia-e nia-e commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The current unsafe code review skill misses one niche edge-case that quite a bit of rust code has inadvertently fallen into - both in library code e.g. bevy and in the standard library, so many times, on so many traits, even recently - twice. This is my attempt at a condensed form of the safety requirements needed to prevent such cases.

cc @obi1kenobi

@Manishearth Manishearth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this makes sense. Ought we also include some real traits that have this problem? E.g. mention DerefPure or something. Or are all such traits fixed already?

@nia-e

nia-e commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

PinSafePointer has this, and it's just unsound without the hack above in # 145608 that forces it to be tighter about coherence. Happy to mention it as well

@Manishearth

Copy link
Copy Markdown
Collaborator

I guess if this pattern is Just Bad then we shouldn't be teaching the agent about real types that do it (that's more useful for it to be able to detect when such types are in play)

@Manishearth
Manishearth merged commit c185f6c into google:main Aug 21, 2026
7 checks passed
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