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