diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/generic-associated-types/missing-bounds.rs | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/generic-associated-types/missing-bounds.rs')
-rw-r--r-- | src/test/ui/generic-associated-types/missing-bounds.rs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/test/ui/generic-associated-types/missing-bounds.rs b/src/test/ui/generic-associated-types/missing-bounds.rs deleted file mode 100644 index ffafff5e9..000000000 --- a/src/test/ui/generic-associated-types/missing-bounds.rs +++ /dev/null @@ -1,46 +0,0 @@ -// run-rustfix - -use std::ops::Add; - -struct A<B>(B); - -impl<B> Add for A<B> where B: Add { - type Output = Self; - - fn add(self, rhs: Self) -> Self { - A(self.0 + rhs.0) //~ ERROR mismatched types - } -} - -struct C<B>(B); - -impl<B: Add> Add for C<B> { - type Output = Self; - - fn add(self, rhs: Self) -> Self { - Self(self.0 + rhs.0) //~ ERROR mismatched types - } -} - -struct D<B>(B); - -impl<B> Add for D<B> { - type Output = Self; - - fn add(self, rhs: Self) -> Self { - Self(self.0 + rhs.0) //~ ERROR cannot add `B` to `B` - } -} - -struct E<B>(B); - -impl<B: Add> Add for E<B> where <B as Add>::Output = B { - //~^ ERROR equality constraints are not yet supported in `where` clauses - type Output = Self; - - fn add(self, rhs: Self) -> Self { - Self(self.0 + rhs.0) //~ ERROR mismatched types - } -} - -fn main() {} |