• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download

returns_arr() -> [u8; 2]1 fn returns_arr() -> [u8; 2] {
2     [1, 2]
3 }
4 
main()5 fn main() {
6     let wrong: [u8; 3] = [10, 20];
7     //~^ ERROR mismatched types
8     //~^^ HELP consider specifying the actual array length
9     let wrong: [u8; 3] = returns_arr();
10     //~^ ERROR mismatched types
11     //~^^ HELP consider specifying the actual array length
12 }
13