When using a rust intrinsic, the error is located on the intrinsic declaration instead of the call location.
Extract from rust/bswap.rs:
extern "rust-intrinsic" {
pub fn bswap<T>(x: T) -> T; // { dg-error "bswap intrinsics can only be used with basic integer types .got 'bool'." }
}
fn main() {
let _ = bswap(true);
}
When using a rust intrinsic, the error is located on the intrinsic declaration instead of the call location.
Extract from
rust/bswap.rs: