Use `rustc` attrs in `dangling_pointers_from_temporaries` lint
@gavincrawford is already working on this.
Since Nov 1, 2024.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
If you want to do it in this PR (otherwise in a follow-up), we could add an
rustcattribute to thoseas_ptr/as_mut_ptrmethods.You can follow https://github.com/rust-lang/rust/pull/132146/commits/afcb09b8c765bf2c5b1362b433725f57af51aaad and https://github.com/rust-lang/rust/pull/132146/commits/2a930d3818d1f4dcaf7a06ed7fc12c102268755d (from a PR of mine) with
check_applied_to_fn_or_methodinstead, and something similar to this to check the attribute https://github.com/rust-lang/rust/blob/e454c45f1397e382cfb59f0b8970445c8efa875f/compiler/rustc_lint/src/ptr_nulls.rs#L49-L50
Originally posted by @Urgau in https://github.com/rust-lang/rust/pull/128985#discussion_r1818068264
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.