-// Copyright (C) 2016 Free Software Foundation, Inc.
+// Copyright (C) 2016-2017 Free Software Foundation, Inc.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Nothing,
}
+enum Univariant {
+ Foo {a: u8}
+}
+enum UnivariantAnon {
+ Foo(u8)
+}
+
+enum ParametrizedEnum<T> {
+ Val { val: T },
+ Empty,
+}
+
+struct ParametrizedStruct<T> {
+ next: ParametrizedEnum<Box<ParametrizedStruct<T>>>,
+ value: T
+}
+
fn main () {
let a = ();
let b : [i32; 0] = [];
let g = b"hi bob";
let h = b'9';
+ let fslice = &f[3..];
+
let i = ["whatever"; 8];
let j = Unit;
+ let j2 = Unit{};
let k = SpaceSaver::Nothing;
let l = SpaceSaver::Thebox(9, Box::new(1729));
let y = HiBob {field1: 7, field2: 8};
let z = ByeBob(7, 8);
+ let univariant = Univariant::Foo {a : 1};
+ let univariant_anon = UnivariantAnon::Foo(1);
+
let slice = &w[2..3];
let fromslice = slice[0];
let slice2 = &slice[0..1];
let custom_some = NonZeroOptimized::Value("hi".into());
let custom_none = NonZeroOptimized::Empty;
+ let parametrized = ParametrizedStruct {
+ next: ParametrizedEnum::Val {
+ val: Box::new(ParametrizedStruct {
+ next: ParametrizedEnum::Empty,
+ value: 1,
+ })
+ },
+ value: 0,
+ };
+
println!("{}, {}", x.0, x.1); // set breakpoint here
println!("{}", diff2(92, 45));
empty();