From f97aba2271baf1876940b42cc68f1b60ac97bf98 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 31 Jul 2024 20:26:08 +0200 Subject: raw_eq: using it on bytes with provenance is not UB (outside const-eval) --- compiler/rustc_const_eval/src/interpret/intrinsics.rs | 3 --- 1 file changed, 3 deletions(-) (limited to 'compiler/rustc_const_eval/src') diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs index 1e3de224380..6b78e49aed2 100644 --- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs +++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs @@ -693,9 +693,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // zero-sized access return Ok(&[]); }; - if alloc_ref.has_provenance() { - throw_ub_custom!(fluent::const_eval_raw_eq_with_provenance); - } alloc_ref.get_bytes_strip_provenance() }; -- cgit 1.4.1-3-g733a5