Limits of type inference smartness

Once you have an array of Priv it’s easy to get a Priv from it:

fn anyarray<T>() -> [T; 1] { panic!() }
let arr = anyarray();
arr.arr1_secret(); // Needed for type inferrence

(&arr[0]).ref_secret();
arr[0].self_secret();
1 Like