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
13 lines
359 B
Rust
13 lines
359 B
Rust
// error-pattern: Unsatisfied precondition constraint
|
|
fn send<send T>(ch: _chan<T>, -data: T) { log ch; log data; fail; }
|
|
type _chan<T> = int;
|
|
|
|
// Tests that "log message;" is flagged as using
|
|
// message after the send deinitializes it
|
|
fn test00_start(ch: _chan<int>, message: int, count: int) {
|
|
send(ch, message);
|
|
log message;
|
|
}
|
|
|
|
fn main() { fail; }
|