Skip to content

Instantly share code, notes, and snippets.

@flaper87
Created February 3, 2014 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flaper87/8793762 to your computer and use it in GitHub Desktop.
Save flaper87/8793762 to your computer and use it in GitHub Desktop.
use std::kinds::marker;
struct Foo {
foo: int,
nopod: marker::NoPod
}
static BAR: Foo = Foo{foo: 5, nopod: marker::NoPod};
fn test(f: Foo) {
let _f = Foo{foo: 4, ..f};
}
fn main() {
test(BAR);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment