Skip to content

Type errors still use old fixed-length vector syntax #4517

Closed
@eevee

Description

@eevee

0.rs:

 fn main()
     let foo = [0u8, ..4];
     bar(foo);
 }

 fn bar(obviously_wrong: int) {}

Fed to rustc 0.5, produces:

0.rs:15:12: 15:15 error: mismatched types: expected `int` but found `[u8]/4` (expected int but found vector)
0.rs:15         bar(foo);
                    ^~~
error: aborting due to previous error

Of course, trying to use [u8]/4 as suggested is a syntax error now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions