summaryrefslogtreecommitdiffstats
path: root/src/test/ui/specialization/default-associated-type-bound-1.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/specialization/default-associated-type-bound-1.rs
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/specialization/default-associated-type-bound-1.rs')
-rw-r--r--src/test/ui/specialization/default-associated-type-bound-1.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/test/ui/specialization/default-associated-type-bound-1.rs b/src/test/ui/specialization/default-associated-type-bound-1.rs
deleted file mode 100644
index c043114b5..000000000
--- a/src/test/ui/specialization/default-associated-type-bound-1.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Check that we check that default associated types satisfy the required
-// bounds on them.
-
-#![feature(specialization)]
-//~^ WARNING `specialization` is incomplete
-
-trait X {
- type U: Clone;
- fn unsafe_clone(&self, x: Option<&Self::U>) {
- x.cloned();
- }
-}
-
-// We cannot normalize `<T as X>::U` to `str` here, because the default could
-// be overridden. The error here must therefore be found by a method other than
-// normalization.
-impl<T> X for T {
- default type U = str;
- //~^ ERROR the trait bound `str: Clone` is not satisfied
-}
-
-pub fn main() {
- 1.unsafe_clone(None);
-}