PageRenderTime 35ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/compile-fail/issue-3044.rs

https://bitbucket.org/graydon/rust
Rust | 9 lines | 5 code | 1 blank | 3 comment | 0 complexity | 1ca80ff3d3d0c7f7eefd0e9cc18ecbc1 MD5 | raw file
  1. // error-pattern: Non-function passed to a `do` function as its last argument, or wrong number of arguments passed to a `do` function
  2. fn main() {
  3. let needlesArr: ~[char] = ~['a', 'f'];
  4. do vec::foldr(needlesArr) |x, y| {
  5. }
  6. // for some reason if I use the new error syntax for the two error messages this generates,
  7. // the test runner gets confused -- tjc
  8. }