2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2013-08-07 13:52:33 -05:00
|
|
|
// aux-build:xcrate_unit_struct.rs
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
2018-08-31 08:02:01 -05:00
|
|
|
#![allow(non_upper_case_globals)]
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2014-02-14 12:10:06 -06:00
|
|
|
extern crate xcrate_unit_struct;
|
2013-08-07 13:52:33 -05:00
|
|
|
|
2014-10-06 23:16:35 -05:00
|
|
|
const s1: xcrate_unit_struct::Struct = xcrate_unit_struct::Struct;
|
2014-11-25 12:00:46 -06:00
|
|
|
static s2: xcrate_unit_struct::Unit = xcrate_unit_struct::Unit::UnitVariant;
|
2013-08-07 13:52:33 -05:00
|
|
|
static s3: xcrate_unit_struct::Unit =
|
2014-11-25 12:00:46 -06:00
|
|
|
xcrate_unit_struct::Unit::Argument(xcrate_unit_struct::Struct);
|
|
|
|
static s4: xcrate_unit_struct::Unit = xcrate_unit_struct::Unit::Argument(s1);
|
2014-10-01 16:28:54 -05:00
|
|
|
static s5: xcrate_unit_struct::TupleStruct = xcrate_unit_struct::TupleStruct(20, "foo");
|
2013-08-07 13:52:33 -05:00
|
|
|
|
|
|
|
fn f1(_: xcrate_unit_struct::Struct) {}
|
|
|
|
fn f2(_: xcrate_unit_struct::Unit) {}
|
2014-10-01 16:28:54 -05:00
|
|
|
fn f3(_: xcrate_unit_struct::TupleStruct) {}
|
2013-08-07 13:52:33 -05:00
|
|
|
|
2014-01-03 17:30:54 -06:00
|
|
|
pub fn main() {
|
2013-08-07 13:52:33 -05:00
|
|
|
f1(xcrate_unit_struct::Struct);
|
2014-11-25 12:00:46 -06:00
|
|
|
f2(xcrate_unit_struct::Unit::UnitVariant);
|
|
|
|
f2(xcrate_unit_struct::Unit::Argument(xcrate_unit_struct::Struct));
|
2014-10-01 16:28:54 -05:00
|
|
|
f3(xcrate_unit_struct::TupleStruct(10, "bar"));
|
2013-08-07 13:52:33 -05:00
|
|
|
|
|
|
|
f1(s1);
|
|
|
|
f2(s2);
|
|
|
|
f2(s3);
|
|
|
|
f2(s4);
|
2014-10-01 16:28:54 -05:00
|
|
|
f3(s5);
|
2013-08-07 13:52:33 -05:00
|
|
|
}
|