diff options
| author | bors <bors@rust-lang.org> | 2023-12-11 14:33:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-11 14:33:16 +0000 |
| commit | b5c0dd6da2c7388b0a1ae60632f7acd81a9ccd40 (patch) | |
| tree | 62384c280d6925392933c40e37eec97f8b3ccd36 /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | e6376631cc1c8c63a1600a3e1bc76158e0885fd5 (diff) | |
| parent | 9d9459a6f9ef3849ff4c5cdd5cfec66cc41b5bc9 (diff) | |
| download | rust-b5c0dd6da2c7388b0a1ae60632f7acd81a9ccd40.tar.gz rust-b5c0dd6da2c7388b0a1ae60632f7acd81a9ccd40.zip | |
Auto merge of #117758 - Urgau:lint_pointer_trait_comparisons, r=davidtwco
Add lint against ambiguous wide pointer comparisons This PR is the resolution of https://github.com/rust-lang/rust/issues/106447 decided in https://github.com/rust-lang/rust/issues/117717 by T-lang. ## `ambiguous_wide_pointer_comparisons` *warn-by-default* The `ambiguous_wide_pointer_comparisons` lint checks comparison of `*const/*mut ?Sized` as the operands. ### Example ```rust let ab = (A, B); let a = &ab.0 as *const dyn T; let b = &ab.1 as *const dyn T; let _ = a == b; ``` ### Explanation The comparison includes metadata which may not be expected. ------- This PR also drops `clippy::vtable_address_comparisons` which is superseded by this one. ~~One thing: is the current naming right? `invalid` seems a bit too much.~~ Fixes https://github.com/rust-lang/rust/issues/117717
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
