This is an automated email from the ASF dual-hosted git repository.

rduan pushed a commit to branch v1.1.6-testing
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/v1.1.6-testing by this push:
     new ed473efc Support rust-nightly-2022-10-22
ed473efc is described below

commit ed473efc6e0520dec4ea5ddc326a85cbc5ed28a2
Author: volcano <[email protected]>
AuthorDate: Sun Oct 23 01:32:30 2022 +0800

    Support rust-nightly-2022-10-22
---
 samplecode/project_template/app/rust-toolchain     |  2 +-
 samplecode/project_template/enclave/rust-toolchain |  2 +-
 sgx_align_struct_attribute/src/layout.rs           |  2 +-
 sgx_alloc/src/alignalloc.rs                        |  2 +-
 sgx_alloc/src/alignbox.rs                          |  8 ++++----
 sgx_tstd/src/time.rs                               |  2 +-
 sgx_tstd/src/untrusted/time.rs                     | 10 ++++++----
 7 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/samplecode/project_template/app/rust-toolchain 
b/samplecode/project_template/app/rust-toolchain
index ea0f16e1..0f99c85c 100644
--- a/samplecode/project_template/app/rust-toolchain
+++ b/samplecode/project_template/app/rust-toolchain
@@ -1 +1 @@
-nightly-2022-10-17
\ No newline at end of file
+nightly-2022-10-22
\ No newline at end of file
diff --git a/samplecode/project_template/enclave/rust-toolchain 
b/samplecode/project_template/enclave/rust-toolchain
index ea0f16e1..0f99c85c 100644
--- a/samplecode/project_template/enclave/rust-toolchain
+++ b/samplecode/project_template/enclave/rust-toolchain
@@ -1 +1 @@
-nightly-2022-10-17
\ No newline at end of file
+nightly-2022-10-22
\ No newline at end of file
diff --git a/sgx_align_struct_attribute/src/layout.rs 
b/sgx_align_struct_attribute/src/layout.rs
index 861f9eee..356885a5 100644
--- a/sgx_align_struct_attribute/src/layout.rs
+++ b/sgx_align_struct_attribute/src/layout.rs
@@ -124,7 +124,7 @@ fn check_align_req(size: usize, align_req: &[AlignReq]) -> 
bool {
 
 fn gen_alignmask(al: usize, a: usize, m: u64) -> i64 {
     if a > al {
-        gen_alignmask(al, (a >> 1) as usize, m | (m >> (a >> 1)))
+        gen_alignmask(al, a >> 1, m | (m >> (a >> 1)))
     } else {
         m as i64
     }
diff --git a/sgx_alloc/src/alignalloc.rs b/sgx_alloc/src/alignalloc.rs
index b83c130c..ffd292d7 100644
--- a/sgx_alloc/src/alignalloc.rs
+++ b/sgx_alloc/src/alignalloc.rs
@@ -308,7 +308,7 @@ mod platform {
 
     fn gen_alignmask(al: usize, a: usize, m: u64) -> i64 {
         if a > al {
-            gen_alignmask(al, (a >> 1) as usize, m | (m >> (a >> 1)))
+            gen_alignmask(al, a >> 1, m | (m >> (a >> 1)))
         } else {
             m as i64
         }
diff --git a/sgx_alloc/src/alignbox.rs b/sgx_alloc/src/alignbox.rs
index 5a888b2d..594f1004 100644
--- a/sgx_alloc/src/alignbox.rs
+++ b/sgx_alloc/src/alignbox.rs
@@ -60,25 +60,25 @@ impl<T> DerefMut for AlignBox<T> {
 
 impl<T> AsRef<T> for AlignBox<T> {
     fn as_ref(&self) -> &T {
-        &**self
+        self
     }
 }
 
 impl<T> AsMut<T> for AlignBox<T> {
     fn as_mut(&mut self) -> &mut T {
-        &mut **self
+        self
     }
 }
 
 impl<T> borrow::Borrow<T> for AlignBox<T> {
     fn borrow(&self) -> &T {
-        &**self
+        self
     }
 }
 
 impl<T> borrow::BorrowMut<T> for AlignBox<T> {
     fn borrow_mut(&mut self) -> &mut T {
-        &mut **self
+        self
     }
 }
 
diff --git a/sgx_tstd/src/time.rs b/sgx_tstd/src/time.rs
index caebd618..2c9ebf75 100644
--- a/sgx_tstd/src/time.rs
+++ b/sgx_tstd/src/time.rs
@@ -372,7 +372,7 @@ impl Instant {
     ///
     /// # Panics
     ///
-    /// Previous rust versions panicked when self was earlier than the current 
time. Currently this
+    /// Previous rust versions panicked when the current time was earlier than 
self. Currently this
     /// method returns a Duration of zero in that case. Future versions may 
reintroduce the panic.
     /// See [Monotonicity].
     ///
diff --git a/sgx_tstd/src/untrusted/time.rs b/sgx_tstd/src/untrusted/time.rs
index 6cd89679..02db95a7 100644
--- a/sgx_tstd/src/untrusted/time.rs
+++ b/sgx_tstd/src/untrusted/time.rs
@@ -42,9 +42,11 @@ impl InstantEx for Instant {
     ///
     /// # Panics
     ///
-    /// This function may panic if the current time is earlier than this
-    /// instant, which is something that can happen if an `Instant` is
-    /// produced synthetically.
+    /// Previous rust versions panicked when the current time was earlier than 
self. Currently this
+    /// method returns a Duration of zero in that case. Future versions may 
reintroduce the panic.
+    /// See [Monotonicity].
+    ///
+    /// [Monotonicity]: Instant#monotonicity
     ///
     /// # Examples
     ///
@@ -90,7 +92,7 @@ impl SystemTimeEx for SystemTime {
     ///
     /// This function may fail as the underlying system clock is susceptible to
     /// drift and updates (e.g., the system clock could go backwards), so this
-    /// function may not always succeed. If successful, 
[`Ok`]`(`[`Duration`]`)` is
+    /// function might not always succeed. If successful, 
<code>[Ok]\([Duration])</code> is
     /// returned where the duration represents the amount of time elapsed from
     /// this time measurement to the current time.
     ///


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to