about summary refs log tree commit diff
path: root/src/libcore/intrinsics.rs
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-06-30 21:12:36 +0300
committerEduard Burtescu <edy.burt@gmail.com>2016-06-30 21:12:36 +0300
commitf698cd3a3663a459e459f530f76adef3eeb815fd (patch)
tree377be430e62d07b623677305b69822a44ca558f4 /src/libcore/intrinsics.rs
parentc2b56fb7a0c24e04227318ca7e5950e9289ee3e4 (diff)
downloadrust-f698cd3a3663a459e459f530f76adef3eeb815fd.tar.gz
rust-f698cd3a3663a459e459f530f76adef3eeb815fd.zip
Revert "Remove the return_address intrinsic."
This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19.
Diffstat (limited to 'src/libcore/intrinsics.rs')
-rw-r--r--src/libcore/intrinsics.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index edb965c1962..94baf188bca 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -293,6 +293,12 @@ extern "rust-intrinsic" {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn transmute<T, U>(e: T) -> U;
 
+    /// Gives the address for the return value of the enclosing function.
+    ///
+    /// Using this intrinsic in a function that does not use an out pointer
+    /// will trigger a compiler error.
+    pub fn return_address() -> *const u8;
+
     /// Returns `true` if the actual type given as `T` requires drop
     /// glue; returns `false` if the actual type provided for `T`
     /// implements `Copy`.