about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/check_consts/check.rs
diff options
context:
space:
mode:
authorBastian Kersting <bkersting@google.com>2025-01-24 14:08:30 +0000
committerBastian Kersting <bkersting@google.com>2025-02-10 12:49:18 +0000
commitf842ee824534e2dbf3c2976f8007890b2238e3c5 (patch)
tree51bc12d5f2dd54ce423969e556a32a433031b479 /compiler/rustc_const_eval/src/check_consts/check.rs
parent80c091958f05e573433df974f8d2f2bc3a3eadfb (diff)
downloadrust-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_const_eval/src/check_consts/check.rs')
-rw-r--r--compiler/rustc_const_eval/src/check_consts/check.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index d0ce027ec2b..90002d3f109 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -710,7 +710,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
 
                 if is_int_bool_float_or_char(lhs_ty) && is_int_bool_float_or_char(rhs_ty) {
                     // Int, bool, float, and char operations are fine.
-                } else if lhs_ty.is_fn_ptr() || lhs_ty.is_unsafe_ptr() {
+                } else if lhs_ty.is_fn_ptr() || lhs_ty.is_raw_ptr() {
                     assert_matches!(
                         op,
                         BinOp::Eq