about summary refs log tree commit diff
path: root/src/libcore/intrinsics.rs
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2020-04-24 00:19:11 -0700
committerJoe Richey <joerichey@google.com>2020-05-25 13:09:02 -0700
commit9b3dfd8ea987ce1d4b5ccbcb4c032f60a71c8cfb (patch)
tree8991eba30b12f651a895ad36de14230c1c9547de /src/libcore/intrinsics.rs
parent08df3116e92356311735be2d0c588d461e16fbff (diff)
downloadrust-9b3dfd8ea987ce1d4b5ccbcb4c032f60a71c8cfb.tar.gz
rust-9b3dfd8ea987ce1d4b5ccbcb4c032f60a71c8cfb.zip
core: Make pointer offset methods "const fn"
Signed-off-by: Joe Richey <joerichey@google.com>
Diffstat (limited to 'src/libcore/intrinsics.rs')
-rw-r--r--src/libcore/intrinsics.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 9006e4cfaf7..2d97fecf8a7 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1314,6 +1314,7 @@ extern "rust-intrinsic" {
     /// The stabilized version of this intrinsic is
     /// [`std::pointer::offset`](../../std/primitive.pointer.html#method.offset).
     #[must_use = "returns a new pointer rather than modifying its argument"]
+    #[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
     pub fn offset<T>(dst: *const T, offset: isize) -> *const T;
 
     /// Calculates the offset from a pointer, potentially wrapping.
@@ -1331,6 +1332,7 @@ extern "rust-intrinsic" {
     /// The stabilized version of this intrinsic is
     /// [`std::pointer::wrapping_offset`](../../std/primitive.pointer.html#method.wrapping_offset).
     #[must_use = "returns a new pointer rather than modifying its argument"]
+    #[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
     pub fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
 
     /// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with