## Problem

The `should_panic!` macro in `sgx_tunittest` uses `std::panic`, which requires 
us the imports
`std::panic` every time we use `should_panic!`.

A demo project goes as 
[patch-sgx_tunittest](https://github.com/sammyne/patch-sgx_tunittest).

To verify, just comment out the patch section of Cargo.toml.

The project demonstrates the this inconvenience, and helps to support [this 
patch](https://github.com/sammyne/incubator-teaclave-sgx-sdk/commit/34a50a6307b2853d907b3a457cf9c961074f98e0#diff-b02276d3fdf8ec232bd27c1b90221758R109).

The patch mainly add the `std::` prefix to the `panic` function in use so as to 
avoid explicit
import of the `std::panic` every time.

Hope it helps~


You can view, comment on, or merge this pull request online at:

  https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217

-- Commit Summary --

  * refactor(sgx_tunittest): remove the necessary 'std' import for 
'should_panic' macro

-- File Changes --

    M sgx_tunittest/src/lib.rs (63)

-- Patch Links --

https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217.patch
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/pull/217

Reply via email to