diff options
| author | Bastian Kersting <bkersting@google.com> | 2025-01-24 14:08:30 +0000 |
|---|---|---|
| committer | Bastian Kersting <bkersting@google.com> | 2025-02-10 12:49:18 +0000 |
| commit | f842ee824534e2dbf3c2976f8007890b2238e3c5 (patch) | |
| tree | 51bc12d5f2dd54ce423969e556a32a433031b479 /compiler/rustc_lint/src/builtin.rs | |
| parent | 80c091958f05e573433df974f8d2f2bc3a3eadfb (diff) | |
| download | rust-f842ee824534e2dbf3c2976f8007890b2238e3c5.tar.gz rust-f842ee824534e2dbf3c2976f8007890b2238e3c5.zip | |
Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr
The wording unsafe pointer is less common and not mentioned in a lot of places, instead this is usually called a "raw pointer". For the sake of uniformity, we rename this method. This came up during the review of https://github.com/rust-lang/rust/pull/134424.
Diffstat (limited to 'compiler/rustc_lint/src/builtin.rs')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 5e6b854ff52..ecd40a52e75 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -576,7 +576,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations { // and recommending Copy might be a bad idea. for field in def.all_fields() { let did = field.did; - if cx.tcx.type_of(did).instantiate_identity().is_unsafe_ptr() { + if cx.tcx.type_of(did).instantiate_identity().is_raw_ptr() { return; } } |
