Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eevee opened this issue Jan 17, 2013 · 1 comment
Closed

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

eevee opened this issue Jan 17, 2013 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@eevee
Copy link

eevee commented Jan 17, 2013

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.

bors added a commit that referenced this issue Feb 26, 2013
Patch for #4517

This works for fixed vectors, but I am unclear how slices should be printed, simply '&[...]'  or...

e.i. How should regions be printed?
@graydon
Copy link
Contributor

graydon commented Mar 20, 2013

fixed during 0.6, closing

@graydon graydon closed this as completed Mar 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants