rust/tests/ui/scalable-vectors/fn-trait.rs
David Wood a56b1b9283
codegen: implement repr(scalable)
Introduces `BackendRepr::ScalableVector` corresponding to scalable
vector types annotated with `repr(scalable)` which lowers to a scalable
vector type in LLVM.

Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com>
2025-12-16 11:00:12 +00:00

13 lines
248 B
Rust

#![allow(internal_features)]
#![feature(rustc_attrs)]
#[rustc_scalable_vector(4)]
pub struct ScalableSimdFloat(f32);
unsafe fn test<T>(f: T)
where
T: Fn(ScalableSimdFloat), //~ ERROR: scalable vectors cannot be tuple fields
{
}
fn main() {}