// option. This file may not be copied, modified, or distributed
// except according to those terms.
+ // If `Index` used an associated type for its output, this test would
+ // work more smoothly.
+ #![feature(old_orphan_check)]
+
+use std::ops::Index;
+
struct Mat<T> { data: Vec<T>, cols: uint, }
impl<T> Mat<T> {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+ // If `Mul` used an associated type for its output, this test would
+ // work more smoothly.
+ #![feature(old_orphan_check)]
+
+use std::ops::Mul;
+
struct Vec2 {
x: f64,
y: f64
#![feature(unboxed_closures)]
use std::ops::Fn;
+use std::ops::Add;
- struct G;
+ struct G<A>;
- impl<'a, A: Add<int, int>> Fn<(A,), int> for G {
+ impl<'a, A: Add<int, int>> Fn<(A,), int> for G<A> {
extern "rust-call" fn call(&self, (arg,): (A,)) -> int {
arg.add(1)
}