diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2023-08-29 05:45:20 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2023-08-29 05:45:20 +0000 |
| commit | fb3565a848af21af18c26156f0acae9115257e46 (patch) | |
| tree | 1451f2e711b883122df8c5f3f7baa19ef46a1c89 | |
| parent | 650294cdc240de273af88d4165e7a47b5357811e (diff) | |
| download | rust-fb3565a848af21af18c26156f0acae9115257e46.tar.gz rust-fb3565a848af21af18c26156f0acae9115257e46.zip | |
fmt
| -rw-r--r-- | src/tools/miri/tests/pass/function_calls/abi_compat.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/miri/tests/pass/function_calls/abi_compat.rs b/src/tools/miri/tests/pass/function_calls/abi_compat.rs index 67b87b46bd9..e586700b0eb 100644 --- a/src/tools/miri/tests/pass/function_calls/abi_compat.rs +++ b/src/tools/miri/tests/pass/function_calls/abi_compat.rs @@ -1,15 +1,17 @@ -use std::num; use std::mem; +use std::num; fn test_abi_compat<T, U>(t: T, u: U) { - fn id<T>(x: T) -> T { x } - + fn id<T>(x: T) -> T { + x + } + // This checks ABI compatibility both for arguments and return values, // in both directions. let f: fn(T) -> T = id; let f: fn(U) -> U = unsafe { std::mem::transmute(f) }; drop(f(u)); - + let f: fn(U) -> U = id; let f: fn(T) -> T = unsafe { std::mem::transmute(f) }; drop(f(t)); |
