Skip to content

Commit

Permalink
Add tests for programs that are invalid by arg-passing-style
Browse files Browse the repository at this point in the history
Closes #1008
  • Loading branch information
marijnh committed Oct 7, 2011
1 parent 8db7153 commit 7586082
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/compile-fail/arg-style-mismatch.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// error-pattern: mismatched types

fn f(&&_x: int) {}
fn g(_a: fn(+int)) {}
fn main() { g(f); }
4 changes: 4 additions & 0 deletions src/test/compile-fail/param-by-value.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// error-pattern:can not pass a dynamically-sized type by value

fn f<T>(+_x: T) {}
fn main() {}

0 comments on commit 7586082

Please sign in to comment.