f6491bb426
This involved adding 'copy' to more generics than I hoped, but an experiment with making it implicit showed that that way lies madness -- unless enforced, you will not remember to mark functions that don't copy as not requiring copyable kind. Issue #1177
12 lines
273 B
Rust
12 lines
273 B
Rust
// error-pattern:quux
|
|
fn test00_start(ch: chan_t<int>, message: int) { send(ch, copy message); }
|
|
|
|
type task_id = int;
|
|
type port_id = int;
|
|
|
|
type chan_t<send T> = {task: task_id, port: port_id};
|
|
|
|
fn send<send T>(ch: chan_t<T>, -data: T) { fail; }
|
|
|
|
fn main() { fail "quux"; }
|