rust-gpu/tests/ui/lang/panic/builtin.rs
XAMPPRocky 27eb1d1413
Refactor validation tests to use compiletest (#464)
* Refactor validation tests to use compiletest

* Update tests/ui/lang/core/ptr/allocate_const_scalar.rs
2021-03-18 17:16:21 +00:00

14 lines
196 B
Rust

// Test panics coming from the Rust language such as `1 / 0`.
// build-pass
use spirv_std as _;
fn int_div(x: usize) -> usize {
1 / x
}
#[spirv(fragment)]
pub fn main() {
int_div(0);
}