summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/alias/generic-default-in-dyn.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
commit17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch)
tree3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /src/test/ui/traits/alias/generic-default-in-dyn.stderr
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-17d40c6057c88f4c432b0d7bac88e1b84cb7e67f.tar.xz
rustc-17d40c6057c88f4c432b0d7bac88e1b84cb7e67f.zip
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/ui/traits/alias/generic-default-in-dyn.stderr39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/ui/traits/alias/generic-default-in-dyn.stderr b/src/test/ui/traits/alias/generic-default-in-dyn.stderr
new file mode 100644
index 000000000..76a068e86
--- /dev/null
+++ b/src/test/ui/traits/alias/generic-default-in-dyn.stderr
@@ -0,0 +1,39 @@
+error[E0658]: trait aliases are experimental
+ --> $DIR/generic-default-in-dyn.rs:1:1
+ |
+LL | trait SendEqAlias<T> = PartialEq;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #41517 <https://github.com/rust-lang/rust/issues/41517> for more information
+ = help: add `#![feature(trait_alias)]` to the crate attributes to enable
+
+error[E0393]: the type parameter `Rhs` must be explicitly specified
+ --> $DIR/generic-default-in-dyn.rs:4:19
+ |
+LL | struct Foo<T>(dyn SendEqAlias<T>);
+ | ^^^^^^^^^^^^^^ missing reference to `Rhs`
+ |
+ ::: $SRC_DIR/core/src/cmp.rs:LL:COL
+ |
+LL | pub trait PartialEq<Rhs: ?Sized = Self> {
+ | --------------------------------------- type parameter `Rhs` must be specified for this
+ |
+ = note: because of the default `Self` reference, type parameters must be specified on object types
+
+error[E0393]: the type parameter `Rhs` must be explicitly specified
+ --> $DIR/generic-default-in-dyn.rs:7:19
+ |
+LL | struct Bar<T>(dyn SendEqAlias<T>, T);
+ | ^^^^^^^^^^^^^^ missing reference to `Rhs`
+ |
+ ::: $SRC_DIR/core/src/cmp.rs:LL:COL
+ |
+LL | pub trait PartialEq<Rhs: ?Sized = Self> {
+ | --------------------------------------- type parameter `Rhs` must be specified for this
+ |
+ = note: because of the default `Self` reference, type parameters must be specified on object types
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0393, E0658.
+For more information about an error, try `rustc --explain E0393`.