Add tests for programs that are invalid by arg-passing-style
Closes #1008
This commit is contained in:
parent
8db71530f5
commit
7586082bb0
5
src/test/compile-fail/arg-style-mismatch.rs
Normal file
5
src/test/compile-fail/arg-style-mismatch.rs
Normal file
@ -0,0 +1,5 @@
|
||||
// error-pattern: mismatched types
|
||||
|
||||
fn f(&&_x: int) {}
|
||||
fn g(_a: fn(+int)) {}
|
||||
fn main() { g(f); }
|
4
src/test/compile-fail/param-by-value.rs
Normal file
4
src/test/compile-fail/param-by-value.rs
Normal file
@ -0,0 +1,4 @@
|
||||
// error-pattern:can not pass a dynamically-sized type by value
|
||||
|
||||
fn f<T>(+_x: T) {}
|
||||
fn main() {}
|
Loading…
x
Reference in New Issue
Block a user