// xfail-test struct list { element: &self/T, mut next: Option<@list> } impl list{ fn addEnd(&self, element: &self/T) { let newList = list { element: element, next: option::None }; self.next = Some(@newList); } } fn main() { let s = @"str"; let ls: list<@str> = list { element: &s, next: option::None }; io::println(*ls.element); }