// Test overloaded indexing combined with autoderef.
-#![feature(associated_types)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
use std::ops::{Index, IndexMut};
}
impl IndexMut<int> for Foo {
- type Output = int;
-
fn index_mut(&mut self, z: &int) -> &mut int {
if *z == 0 {
&mut self.x
assert_eq!(f[1].get(), 5);
assert_eq!(f[1].get_from_ref(), 5);
}
-