Skip to content

Commit e530b3d

Browse files
authored
Rollup merge of rust-lang#122935 - RalfJung:with-exposed-provenance, r=Amanieu
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066). The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".) The new name nicely matches `ptr::without_provenance`.
2 parents 11b28d4 + 4d62301 commit e530b3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fn check_rvalue<'tcx>(
112112
Rvalue::Repeat(operand, _)
113113
| Rvalue::Use(operand)
114114
| Rvalue::Cast(
115-
CastKind::PointerFromExposedAddress
115+
CastKind::PointerWithExposedProvenance
116116
| CastKind::IntToInt
117117
| CastKind::FloatToInt
118118
| CastKind::IntToFloat

0 commit comments

Comments
 (0)