Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRustgenerics basicsSingle-choice MCQ

What does the type annotation on `numbers` force the compiler to infer for this generic call?

fn first<T>(items: &[T]) -> &T { &items[0] } fn main() { let numbers = vec![10, 20, 30]; let x: &i32 = first(&numbers); println!("{}", x); }