Skip to content

Use attributes for dangling_pointers_from_temporaries lint#132732

Merged
bors merged 6 commits intorust-lang:masterfrom
gavincrawford:as_ptr_attribute
Nov 20, 2024
Merged

Use attributes for dangling_pointers_from_temporaries lint#132732
bors merged 6 commits intorust-lang:masterfrom
gavincrawford:as_ptr_attribute

Conversation

@gavincrawford
Copy link
Contributor

Checking for dangling pointers by function name isn't ideal, and leaves out certain pointer-returning methods that don't follow the as_ptr naming convention. Using an attribute for this lint cleans things up and allows more thorough coverage of other methods, such as UnsafeCell::get().

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L-dangling_pointers_from_temporaries Lint: dangling_pointers_from_temporaries S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants