diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-29 08:49:37 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-09-29 08:49:37 +0200 |
| commit | 7eedb6846cb76f76738c4ba51095a9742cb3ffd3 (patch) | |
| tree | 828a72a5e6dd327d4f35729cf93d3d586b9b8fba | |
| parent | c55c4c9f9de86034a942909d657e75ffb5674a73 (diff) | |
| download | rust-7eedb6846cb76f76738c4ba51095a9742cb3ffd3.tar.gz rust-7eedb6846cb76f76738c4ba51095a9742cb3ffd3.zip | |
adjust test
| -rw-r--r-- | tests/ui/asm/const-error.rs | 6 | ||||
| -rw-r--r-- | tests/ui/asm/const-error.stderr | 9 |
2 files changed, 4 insertions, 11 deletions
diff --git a/tests/ui/asm/const-error.rs b/tests/ui/asm/const-error.rs index 40d0590c33e..8c722906284 100644 --- a/tests/ui/asm/const-error.rs +++ b/tests/ui/asm/const-error.rs @@ -1,14 +1,16 @@ //@ only-x86_64 //@ needs-asm-support +//@ check-pass -// Test to make sure that we emit const errors eagerly for inline asm +// Test to make sure that we emit const errors late for inline asm, +// which is consistent with inline const blocks. use std::arch::asm; fn test<T>() { unsafe { + // No error here, as this does not get monomorphized. asm!("/* {} */", const 1 / 0); - //~^ ERROR evaluation of } } diff --git a/tests/ui/asm/const-error.stderr b/tests/ui/asm/const-error.stderr deleted file mode 100644 index 02e54457e89..00000000000 --- a/tests/ui/asm/const-error.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0080]: evaluation of `test::<T>::{constant#0}` failed - --> $DIR/const-error.rs:10:32 - | -LL | asm!("/* {} */", const 1 / 0); - | ^^^^^ attempt to divide `1_i32` by zero - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0080`. |
