about summary refs log tree commit diff
path: root/src/test/ui/traits/default-method
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/traits/default-method
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/traits/default-method')
-rw-r--r--src/test/ui/traits/default-method/auxiliary/xc.rs40
-rw-r--r--src/test/ui/traits/default-method/auxiliary/xc_2.rs17
-rw-r--r--src/test/ui/traits/default-method/bound-subst.rs18
-rw-r--r--src/test/ui/traits/default-method/bound-subst2.rs16
-rw-r--r--src/test/ui/traits/default-method/bound-subst3.rs17
-rw-r--r--src/test/ui/traits/default-method/bound-subst4.rs19
-rw-r--r--src/test/ui/traits/default-method/bound.rs16
-rw-r--r--src/test/ui/traits/default-method/macro.rs20
-rw-r--r--src/test/ui/traits/default-method/mut.rs11
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of.rs44
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of.stderr15
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.rs19
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.stderr34
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.rs13
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr11
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.rs46
-rw-r--r--src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr100
-rw-r--r--src/test/ui/traits/default-method/self.rs18
-rw-r--r--src/test/ui/traits/default-method/supervtable.rs28
-rw-r--r--src/test/ui/traits/default-method/trivial.rs21
-rw-r--r--src/test/ui/traits/default-method/xc-2.rs26
-rw-r--r--src/test/ui/traits/default-method/xc.rs81
22 files changed, 0 insertions, 630 deletions
diff --git a/src/test/ui/traits/default-method/auxiliary/xc.rs b/src/test/ui/traits/default-method/auxiliary/xc.rs
deleted file mode 100644
index 0fb26af80c7..00000000000
--- a/src/test/ui/traits/default-method/auxiliary/xc.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-pub struct Something { pub x: isize }
-
-pub trait A {
-    fn f(&self) -> isize;
-    fn g(&self) -> isize { 10 }
-    fn h(&self) -> isize { 11 }
-    fn lurr(x: &Self, y: &Self) -> isize { x.g() + y.h() }
-}
-
-
-impl A for isize {
-    fn f(&self) -> isize { 10 }
-}
-
-impl A for Something {
-    fn f(&self) -> isize { 10 }
-}
-
-pub trait B<T> {
-    fn thing<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
-    fn staticthing<U>(_z: &Self, x: T, y: U) -> (T, U) { (x, y) }
-}
-
-impl<T> B<T> for isize { }
-impl B<f64> for bool { }
-
-
-
-pub trait TestEquality {
-    fn test_eq(&self, rhs: &Self) -> bool;
-    fn test_neq(&self, rhs: &Self) -> bool {
-        !self.test_eq(rhs)
-    }
-}
-
-impl TestEquality for isize {
-    fn test_eq(&self, rhs: &isize) -> bool {
-        *self == *rhs
-    }
-}
diff --git a/src/test/ui/traits/default-method/auxiliary/xc_2.rs b/src/test/ui/traits/default-method/auxiliary/xc_2.rs
deleted file mode 100644
index 9792338204c..00000000000
--- a/src/test/ui/traits/default-method/auxiliary/xc_2.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// aux-build:xc.rs
-
-extern crate xc as aux;
-use aux::A;
-
-pub struct a_struct { pub x: isize }
-
-impl A for a_struct {
-    fn f(&self) -> isize { 10 }
-}
-
-// This function will need to get inlined, and badness may result.
-pub fn welp<A>(x: A) -> A {
-    let a = a_struct { x: 0 };
-    a.g();
-    x
-}
diff --git a/src/test/ui/traits/default-method/bound-subst.rs b/src/test/ui/traits/default-method/bound-subst.rs
deleted file mode 100644
index 6a5d5c8ba2d..00000000000
--- a/src/test/ui/traits/default-method/bound-subst.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// run-pass
-
-
-trait A<T> {
-    fn g<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
-}
-
-impl A<i32> for i32 { }
-impl<T> A<T> for u32 { }
-
-fn f<T, U, V: A<T>>(i: V, j: T, k: U) -> (T, U) {
-    i.g(j, k)
-}
-
-pub fn main () {
-    assert_eq!(f(0, 1, 2), (1, 2));
-    assert_eq!(f(0, 1, 2), (1, 2));
-}
diff --git a/src/test/ui/traits/default-method/bound-subst2.rs b/src/test/ui/traits/default-method/bound-subst2.rs
deleted file mode 100644
index 78eabba2d23..00000000000
--- a/src/test/ui/traits/default-method/bound-subst2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// run-pass
-
-
-trait A<T> {
-    fn g(&self, x: T) -> T { x }
-}
-
-impl A<isize> for isize { }
-
-fn f<T, V: A<T>>(i: V, j: T) -> T {
-    i.g(j)
-}
-
-pub fn main () {
-    assert_eq!(f(0, 2), 2);
-}
diff --git a/src/test/ui/traits/default-method/bound-subst3.rs b/src/test/ui/traits/default-method/bound-subst3.rs
deleted file mode 100644
index dd39dec4b63..00000000000
--- a/src/test/ui/traits/default-method/bound-subst3.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-pass
-
-
-trait A {
-    fn g<T>(&self, x: T, y: T) -> (T, T) { (x, y) }
-}
-
-impl A for isize { }
-
-fn f<T, V: A>(i: V, j: T, k: T) -> (T, T) {
-    i.g(j, k)
-}
-
-pub fn main () {
-    assert_eq!(f(0, 1, 2), (1, 2));
-    assert_eq!(f(0, 1u8, 2u8), (1u8, 2u8));
-}
diff --git a/src/test/ui/traits/default-method/bound-subst4.rs b/src/test/ui/traits/default-method/bound-subst4.rs
deleted file mode 100644
index ef133064582..00000000000
--- a/src/test/ui/traits/default-method/bound-subst4.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-pass
-#![allow(unused_variables)]
-
-
-trait A<T> {
-    fn g(&self, x: usize) -> usize { x }
-    fn h(&self, x: T) { }
-}
-
-impl<T> A<T> for isize { }
-
-fn f<T, V: A<T>>(i: V, j: usize) -> usize {
-    i.g(j)
-}
-
-pub fn main () {
-    assert_eq!(f::<f64, isize>(0, 2), 2);
-    assert_eq!(f::<usize, isize>(0, 2), 2);
-}
diff --git a/src/test/ui/traits/default-method/bound.rs b/src/test/ui/traits/default-method/bound.rs
deleted file mode 100644
index 0855a9db851..00000000000
--- a/src/test/ui/traits/default-method/bound.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// run-pass
-
-
-trait A {
-    fn g(&self) -> isize { 10 }
-}
-
-impl A for isize { }
-
-fn f<T:A>(i: T) {
-    assert_eq!(i.g(), 10);
-}
-
-pub fn main () {
-    f(0);
-}
diff --git a/src/test/ui/traits/default-method/macro.rs b/src/test/ui/traits/default-method/macro.rs
deleted file mode 100644
index 2b50ee9b422..00000000000
--- a/src/test/ui/traits/default-method/macro.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// run-pass
-
-
-trait Foo {
-    fn bar(&self) -> String {
-        format!("test")
-    }
-}
-
-enum Baz {
-    Quux
-}
-
-impl Foo for Baz {
-}
-
-pub fn main() {
-    let q = Baz::Quux;
-    assert_eq!(q.bar(), "test".to_string());
-}
diff --git a/src/test/ui/traits/default-method/mut.rs b/src/test/ui/traits/default-method/mut.rs
deleted file mode 100644
index 5f8e983b09c..00000000000
--- a/src/test/ui/traits/default-method/mut.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-pass
-#![allow(unused_assignments)]
-// pretty-expanded FIXME #23616
-
-#![allow(unused_variables)]
-
-trait Foo {
-    fn foo(&self, mut v: isize) { v = 1; }
-}
-
-pub fn main() {}
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of.rs b/src/test/ui/traits/default-method/rustc_must_implement_one_of.rs
deleted file mode 100644
index 5ba2f5ce334..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-#![feature(rustc_attrs)]
-
-#[rustc_must_implement_one_of(eq, neq)]
-trait Equal {
-    fn eq(&self, other: &Self) -> bool {
-        !self.neq(other)
-    }
-
-    fn neq(&self, other: &Self) -> bool {
-        !self.eq(other)
-    }
-}
-
-struct T0;
-struct T1;
-struct T2;
-struct T3;
-
-impl Equal for T0 {
-    fn eq(&self, _other: &Self) -> bool {
-        true
-    }
-}
-
-impl Equal for T1 {
-    fn neq(&self, _other: &Self) -> bool {
-        false
-    }
-}
-
-impl Equal for T2 {
-    fn eq(&self, _other: &Self) -> bool {
-        true
-    }
-
-    fn neq(&self, _other: &Self) -> bool {
-        false
-    }
-}
-
-impl Equal for T3 {}
-//~^ not all trait items implemented, missing one of: `eq`, `neq`
-
-fn main() {}
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of.stderr b/src/test/ui/traits/default-method/rustc_must_implement_one_of.stderr
deleted file mode 100644
index 5a4dd1388b2..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0046]: not all trait items implemented, missing one of: `eq`, `neq`
-  --> $DIR/rustc_must_implement_one_of.rs:41:1
-   |
-LL | impl Equal for T3 {}
-   | ^^^^^^^^^^^^^^^^^ missing one of `eq`, `neq` in implementation
-   |
-note: required because of this annotation
-  --> $DIR/rustc_must_implement_one_of.rs:3:1
-   |
-LL | #[rustc_must_implement_one_of(eq, neq)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0046`.
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.rs b/src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.rs
deleted file mode 100644
index 8db5fa615c0..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#![feature(rustc_attrs)]
-
-#[rustc_must_implement_one_of(a, a)]
-//~^ functions names are duplicated
-trait Trait {
-    fn a() {}
-}
-
-#[rustc_must_implement_one_of(b, a, a, c, b, c)]
-//~^ functions names are duplicated
-//~| functions names are duplicated
-//~| functions names are duplicated
-trait Trait1 {
-    fn a() {}
-    fn b() {}
-    fn c() {}
-}
-
-fn main() {}
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.stderr b/src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.stderr
deleted file mode 100644
index cd1476a6eb8..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of_duplicates.stderr
+++ /dev/null
@@ -1,34 +0,0 @@
-error: functions names are duplicated
-  --> $DIR/rustc_must_implement_one_of_duplicates.rs:3:31
-   |
-LL | #[rustc_must_implement_one_of(a, a)]
-   |                               ^  ^
-   |
-   = note: all `#[rustc_must_implement_one_of]` arguments must be unique
-
-error: functions names are duplicated
-  --> $DIR/rustc_must_implement_one_of_duplicates.rs:9:34
-   |
-LL | #[rustc_must_implement_one_of(b, a, a, c, b, c)]
-   |                                  ^  ^
-   |
-   = note: all `#[rustc_must_implement_one_of]` arguments must be unique
-
-error: functions names are duplicated
-  --> $DIR/rustc_must_implement_one_of_duplicates.rs:9:31
-   |
-LL | #[rustc_must_implement_one_of(b, a, a, c, b, c)]
-   |                               ^           ^
-   |
-   = note: all `#[rustc_must_implement_one_of]` arguments must be unique
-
-error: functions names are duplicated
-  --> $DIR/rustc_must_implement_one_of_duplicates.rs:9:40
-   |
-LL | #[rustc_must_implement_one_of(b, a, a, c, b, c)]
-   |                                        ^     ^
-   |
-   = note: all `#[rustc_must_implement_one_of]` arguments must be unique
-
-error: aborting due to 4 previous errors
-
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.rs b/src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.rs
deleted file mode 100644
index ec2995872de..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#[rustc_must_implement_one_of(eq, neq)]
-//~^ the `#[rustc_must_implement_one_of]` attribute is used to change minimal complete definition of a trait, it's currently in experimental form and should be changed before being exposed outside of the std
-trait Equal {
-    fn eq(&self, other: &Self) -> bool {
-        !self.neq(other)
-    }
-
-    fn neq(&self, other: &Self) -> bool {
-        !self.eq(other)
-    }
-}
-
-fn main() {}
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr b/src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr
deleted file mode 100644
index 228bc3e35c2..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0658]: the `#[rustc_must_implement_one_of]` attribute is used to change minimal complete definition of a trait, it's currently in experimental form and should be changed before being exposed outside of the std
-  --> $DIR/rustc_must_implement_one_of_gated.rs:1:1
-   |
-LL | #[rustc_must_implement_one_of(eq, neq)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.rs b/src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.rs
deleted file mode 100644
index b1b91966c8d..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-#![feature(rustc_attrs)]
-
-#[rustc_must_implement_one_of(a, b)]
-//~^ function not found in this trait
-//~| function not found in this trait
-trait Tr0 {}
-
-#[rustc_must_implement_one_of(a, b)]
-//~^ function not found in this trait
-trait Tr1 {
-    fn a() {}
-}
-
-#[rustc_must_implement_one_of(a)]
-//~^ the `#[rustc_must_implement_one_of]` attribute must be used with at least 2 args
-trait Tr2 {
-    fn a() {}
-}
-
-#[rustc_must_implement_one_of]
-//~^ malformed `rustc_must_implement_one_of` attribute input
-trait Tr3 {}
-
-#[rustc_must_implement_one_of(A, B)]
-trait Tr4 {
-    const A: u8 = 1; //~ not a function
-
-    type B; //~ not a function
-}
-
-#[rustc_must_implement_one_of(a, b)]
-trait Tr5 {
-    fn a(); //~ function doesn't have a default implementation
-
-    fn b(); //~ function doesn't have a default implementation
-}
-
-#[rustc_must_implement_one_of(abc, xyz)]
-//~^ attribute should be applied to a trait
-fn function() {}
-
-#[rustc_must_implement_one_of(abc, xyz)]
-//~^ attribute should be applied to a trait
-struct Struct {}
-
-fn main() {}
diff --git a/src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr b/src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr
deleted file mode 100644
index 38e692521ca..00000000000
--- a/src/test/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr
+++ /dev/null
@@ -1,100 +0,0 @@
-error: malformed `rustc_must_implement_one_of` attribute input
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:20:1
-   |
-LL | #[rustc_must_implement_one_of]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_must_implement_one_of(function1, function2, ...)]`
-
-error: attribute should be applied to a trait
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:38:1
-   |
-LL | #[rustc_must_implement_one_of(abc, xyz)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-LL |
-LL | fn function() {}
-   | ---------------- not a trait
-
-error: attribute should be applied to a trait
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:42:1
-   |
-LL | #[rustc_must_implement_one_of(abc, xyz)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-LL |
-LL | struct Struct {}
-   | ---------------- not a trait
-
-error: function not found in this trait
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:3:31
-   |
-LL | #[rustc_must_implement_one_of(a, b)]
-   |                               ^
-
-error: function not found in this trait
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:3:34
-   |
-LL | #[rustc_must_implement_one_of(a, b)]
-   |                                  ^
-
-error: function not found in this trait
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:8:34
-   |
-LL | #[rustc_must_implement_one_of(a, b)]
-   |                                  ^
-
-error: the `#[rustc_must_implement_one_of]` attribute must be used with at least 2 args
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:14:1
-   |
-LL | #[rustc_must_implement_one_of(a)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: not a function
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:26:5
-   |
-LL |     const A: u8 = 1;
-   |     ^^^^^^^^^^^^^^^^
-   |
-note: required by this annotation
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:24:1
-   |
-LL | #[rustc_must_implement_one_of(A, B)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: all `#[rustc_must_implement_one_of]` arguments must be associated function names
-
-error: not a function
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:28:5
-   |
-LL |     type B;
-   |     ^^^^^^^
-   |
-note: required by this annotation
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:24:1
-   |
-LL | #[rustc_must_implement_one_of(A, B)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: all `#[rustc_must_implement_one_of]` arguments must be associated function names
-
-error: function doesn't have a default implementation
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:33:5
-   |
-LL |     fn a();
-   |     ^^^^^^^
-   |
-note: required by this annotation
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:31:1
-   |
-LL | #[rustc_must_implement_one_of(a, b)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: function doesn't have a default implementation
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:35:5
-   |
-LL |     fn b();
-   |     ^^^^^^^
-   |
-note: required by this annotation
-  --> $DIR/rustc_must_implement_one_of_misuse.rs:31:1
-   |
-LL | #[rustc_must_implement_one_of(a, b)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 11 previous errors
-
diff --git a/src/test/ui/traits/default-method/self.rs b/src/test/ui/traits/default-method/self.rs
deleted file mode 100644
index cdf4d1e148c..00000000000
--- a/src/test/ui/traits/default-method/self.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// run-pass
-
-
-trait Cat {
-    fn meow(&self) -> bool;
-    fn scratch(&self) -> bool { self.purr() }
-    fn purr(&self) -> bool { true }
-}
-
-impl Cat for isize {
-    fn meow(&self) -> bool {
-        self.scratch()
-    }
-}
-
-pub fn main() {
-    assert!(5.meow());
-}
diff --git a/src/test/ui/traits/default-method/supervtable.rs b/src/test/ui/traits/default-method/supervtable.rs
deleted file mode 100644
index 939ad51355e..00000000000
--- a/src/test/ui/traits/default-method/supervtable.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// run-pass
-
-
-// Tests that we can call a function bounded over a supertrait from
-// a default method
-
-fn require_y<T: Y>(x: T) -> isize { x.y() }
-
-trait Y {
-    fn y(self) -> isize;
-}
-
-
-trait Z: Y + Sized {
-    fn x(self) -> isize {
-        require_y(self)
-    }
-}
-
-impl Y for isize {
-    fn y(self) -> isize { self }
-}
-
-impl Z for isize {}
-
-pub fn main() {
-    assert_eq!(12.x(), 12);
-}
diff --git a/src/test/ui/traits/default-method/trivial.rs b/src/test/ui/traits/default-method/trivial.rs
deleted file mode 100644
index dc41938ec89..00000000000
--- a/src/test/ui/traits/default-method/trivial.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// run-pass
-
-
-trait Cat {
-    fn meow(&self) -> bool;
-    fn scratch(&self) -> bool;
-    fn purr(&self) -> bool { true }
-}
-
-impl Cat for isize {
-    fn meow(&self) -> bool {
-        self.scratch()
-    }
-    fn scratch(&self) -> bool {
-        self.purr()
-    }
-}
-
-pub fn main() {
-    assert!(5.meow());
-}
diff --git a/src/test/ui/traits/default-method/xc-2.rs b/src/test/ui/traits/default-method/xc-2.rs
deleted file mode 100644
index 1de61dcf896..00000000000
--- a/src/test/ui/traits/default-method/xc-2.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// run-pass
-// aux-build:xc.rs
-// aux-build:xc_2.rs
-
-
-
-extern crate xc as aux;
-extern crate xc_2 as aux2;
-use aux::A;
-use aux2::{a_struct, welp};
-
-
-pub fn main () {
-
-    let a = a_struct { x: 0 };
-    let b = a_struct { x: 1 };
-
-    assert_eq!(0.g(), 10);
-    assert_eq!(a.g(), 10);
-    assert_eq!(a.h(), 11);
-    assert_eq!(b.g(), 10);
-    assert_eq!(b.h(), 11);
-    assert_eq!(A::lurr(&a, &b), 21);
-
-    welp(&0);
-}
diff --git a/src/test/ui/traits/default-method/xc.rs b/src/test/ui/traits/default-method/xc.rs
deleted file mode 100644
index 76a1573d6c7..00000000000
--- a/src/test/ui/traits/default-method/xc.rs
+++ /dev/null
@@ -1,81 +0,0 @@
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-// aux-build:xc.rs
-
-
-extern crate xc as aux;
-use aux::{A, TestEquality, Something};
-use aux::B;
-
-fn f<T: aux::A>(i: T) {
-    assert_eq!(i.g(), 10);
-}
-
-fn welp<T>(i: isize, _x: &T) -> isize {
-    i.g()
-}
-
-mod stuff {
-    pub struct thing { pub x: isize }
-}
-
-impl A for stuff::thing {
-    fn f(&self) -> isize { 10 }
-}
-
-fn g<T, U, V: B<T>>(i: V, j: T, k: U) -> (T, U) {
-    i.thing(j, k)
-}
-
-fn eq<T: TestEquality>(lhs: &T, rhs: &T) -> bool {
-    lhs.test_eq(rhs)
-}
-fn neq<T: TestEquality>(lhs: &T, rhs: &T) -> bool {
-    lhs.test_neq(rhs)
-}
-
-
-impl TestEquality for stuff::thing {
-    fn test_eq(&self, rhs: &stuff::thing) -> bool {
-        //self.x.test_eq(&rhs.x)
-        eq(&self.x, &rhs.x)
-    }
-}
-
-
-pub fn main() {
-    // Some tests of random things
-    f(0);
-
-    assert_eq!(A::lurr(&0, &1), 21);
-
-    let a = stuff::thing { x: 0 };
-    let b = stuff::thing { x: 1 };
-    let c = Something { x: 1 };
-
-    assert_eq!(0.g(), 10);
-    assert_eq!(a.g(), 10);
-    assert_eq!(a.h(), 11);
-    assert_eq!(c.h(), 11);
-
-    assert_eq!(0.thing(3.14f64, 1), (3.14f64, 1));
-    assert_eq!(B::staticthing(&0, 3.14f64, 1), (3.14f64, 1));
-    assert_eq!(B::<f64>::staticthing::<isize>(&0, 3.14, 1), (3.14, 1));
-
-    assert_eq!(g(0, 3.14f64, 1), (3.14f64, 1));
-    assert_eq!(g(false, 3.14f64, 1), (3.14, 1));
-
-
-    // Trying out a real one
-    assert!(12.test_neq(&10));
-    assert!(!10.test_neq(&10));
-    assert!(a.test_neq(&b));
-    assert!(!a.test_neq(&a));
-
-    assert!(neq(&12, &10));
-    assert!(!neq(&10, &10));
-    assert!(neq(&a, &b));
-    assert!(!neq(&a, &a));
-}