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
8 lines
154 B
Rust
8 lines
154 B
Rust
|
|
|
|
|
|
// -*- rust -*-
|
|
fn f<copy T, copy U>(x: T, y: U) -> {a: T, b: U} { ret {a: x, b: y}; }
|
|
|
|
fn main() { log f({x: 3, y: 4, z: 5}, 4).a.x; log f(5, 6).a; }
|