summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics/bad-mid-path-type-params.stderr
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 /tests/ui/generics/bad-mid-path-type-params.stderr
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 'tests/ui/generics/bad-mid-path-type-params.stderr')
-rw-r--r--tests/ui/generics/bad-mid-path-type-params.stderr73
1 files changed, 73 insertions, 0 deletions
diff --git a/tests/ui/generics/bad-mid-path-type-params.stderr b/tests/ui/generics/bad-mid-path-type-params.stderr
new file mode 100644
index 000000000..aee2b6015
--- /dev/null
+++ b/tests/ui/generics/bad-mid-path-type-params.stderr
@@ -0,0 +1,73 @@
+error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
+ --> $DIR/bad-mid-path-type-params.rs:30:16
+ |
+LL | let _ = S::new::<isize,f64>(1, 1.0);
+ | ^^^ --- help: remove this generic argument
+ | |
+ | expected 1 generic argument
+ |
+note: associated function defined here, with 1 generic parameter: `U`
+ --> $DIR/bad-mid-path-type-params.rs:6:8
+ |
+LL | fn new<U>(x: T, _: U) -> S<T> {
+ | ^^^ -
+
+error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
+ --> $DIR/bad-mid-path-type-params.rs:33:13
+ |
+LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0);
+ | ^ -- help: remove this lifetime argument
+ | |
+ | expected 0 lifetime arguments
+ |
+note: struct defined here, with 0 lifetime parameters
+ --> $DIR/bad-mid-path-type-params.rs:1:8
+ |
+LL | struct S<T> {
+ | ^
+
+error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
+ --> $DIR/bad-mid-path-type-params.rs:36:24
+ |
+LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0);
+ | ^^^ --- help: remove this generic argument
+ | |
+ | expected 1 generic argument
+ |
+note: associated function defined here, with 1 generic parameter: `U`
+ --> $DIR/bad-mid-path-type-params.rs:14:8
+ |
+LL | fn new<U>(x: T, y: U) -> Self;
+ | ^^^ -
+
+error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
+ --> $DIR/bad-mid-path-type-params.rs:39:17
+ |
+LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
+ | ^^^^^ -- help: remove this lifetime argument
+ | |
+ | expected 0 lifetime arguments
+ |
+note: trait defined here, with 0 lifetime parameters
+ --> $DIR/bad-mid-path-type-params.rs:13:7
+ |
+LL | trait Trait<T> {
+ | ^^^^^
+
+error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
+ --> $DIR/bad-mid-path-type-params.rs:39:36
+ |
+LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
+ | ^^^ --- help: remove this generic argument
+ | |
+ | expected 1 generic argument
+ |
+note: associated function defined here, with 1 generic parameter: `U`
+ --> $DIR/bad-mid-path-type-params.rs:14:8
+ |
+LL | fn new<U>(x: T, y: U) -> Self;
+ | ^^^ -
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0107`.