diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/traits/default-method/auxiliary | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/traits/default-method/auxiliary')
-rw-r--r-- | src/test/ui/traits/default-method/auxiliary/xc.rs | 40 | ||||
-rw-r--r-- | src/test/ui/traits/default-method/auxiliary/xc_2.rs | 17 |
2 files changed, 0 insertions, 57 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 0fb26af80..000000000 --- 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 979233820..000000000 --- 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 -} |