2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct S { f0: String, f1: isize }
|
2013-02-24 15:15:05 -06:00
|
|
|
|
|
|
|
pub fn main() {
|
2014-05-25 05:17:19 -05:00
|
|
|
let s = "Hello, world!".to_string();
|
2015-03-08 14:46:04 -05:00
|
|
|
let s = S {
|
2014-05-25 05:17:19 -05:00
|
|
|
f0: s.to_string(),
|
2014-05-12 19:56:43 -05:00
|
|
|
..S {
|
|
|
|
f0: s,
|
|
|
|
f1: 23
|
|
|
|
}
|
|
|
|
};
|
2015-03-08 14:46:04 -05:00
|
|
|
assert_eq!(s.f0, "Hello, world!");
|
2013-02-24 15:15:05 -06:00
|
|
|
}
|