summaryrefslogtreecommitdiffstats
path: root/src/test/ui/duplicate/duplicate-type-parameter.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/duplicate/duplicate-type-parameter.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/duplicate/duplicate-type-parameter.stderr')
-rw-r--r--src/test/ui/duplicate/duplicate-type-parameter.stderr66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/test/ui/duplicate/duplicate-type-parameter.stderr b/src/test/ui/duplicate/duplicate-type-parameter.stderr
new file mode 100644
index 000000000..6754574f0
--- /dev/null
+++ b/src/test/ui/duplicate/duplicate-type-parameter.stderr
@@ -0,0 +1,66 @@
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:1:12
+ |
+LL | type Foo<T,T> = Option<T>;
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:4:14
+ |
+LL | struct Bar<T,T>(T);
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:7:14
+ |
+LL | struct Baz<T,T> {
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:12:12
+ |
+LL | enum Boo<T,T> {
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:18:11
+ |
+LL | fn quux<T,T>(x: T) {}
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:21:13
+ |
+LL | trait Qux<T,T> {}
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
+ --> $DIR/duplicate-type-parameter.rs:24:8
+ |
+LL | impl<T,T> Qux<T,T> for Option<T> {}
+ | - ^ already used
+ | |
+ | first use of `T`
+
+error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
+ --> $DIR/duplicate-type-parameter.rs:24:6
+ |
+LL | impl<T,T> Qux<T,T> for Option<T> {}
+ | ^ unconstrained type parameter
+
+error: aborting due to 8 previous errors
+
+Some errors have detailed explanations: E0207, E0403.
+For more information about an error, try `rustc --explain E0207`.