]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/bad-mid-path-type-params.stderr
Rollup merge of #106935 - TaKO8Ki:fix-104440, r=cjgillot
[rust.git] / tests / ui / generics / bad-mid-path-type-params.stderr
1 error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
2   --> $DIR/bad-mid-path-type-params.rs:30:16
3    |
4 LL |     let _ = S::new::<isize,f64>(1, 1.0);
5    |                ^^^         --- help: remove this generic argument
6    |                |
7    |                expected 1 generic argument
8    |
9 note: associated function defined here, with 1 generic parameter: `U`
10   --> $DIR/bad-mid-path-type-params.rs:6:8
11    |
12 LL |     fn new<U>(x: T, _: U) -> S<T> {
13    |        ^^^ -
14
15 error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
16   --> $DIR/bad-mid-path-type-params.rs:33:13
17    |
18 LL |     let _ = S::<'a,isize>::new::<f64>(1, 1.0);
19    |             ^   -- help: remove this lifetime argument
20    |             |
21    |             expected 0 lifetime arguments
22    |
23 note: struct defined here, with 0 lifetime parameters
24   --> $DIR/bad-mid-path-type-params.rs:1:8
25    |
26 LL | struct S<T> {
27    |        ^
28
29 error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
30   --> $DIR/bad-mid-path-type-params.rs:36:24
31    |
32 LL |     let _: S2 = Trait::new::<isize,f64>(1, 1.0);
33    |                        ^^^         --- help: remove this generic argument
34    |                        |
35    |                        expected 1 generic argument
36    |
37 note: associated function defined here, with 1 generic parameter: `U`
38   --> $DIR/bad-mid-path-type-params.rs:14:8
39    |
40 LL |     fn new<U>(x: T, y: U) -> Self;
41    |        ^^^ -
42
43 error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
44   --> $DIR/bad-mid-path-type-params.rs:39:17
45    |
46 LL |     let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
47    |                 ^^^^^   -- help: remove this lifetime argument
48    |                 |
49    |                 expected 0 lifetime arguments
50    |
51 note: trait defined here, with 0 lifetime parameters
52   --> $DIR/bad-mid-path-type-params.rs:13:7
53    |
54 LL | trait Trait<T> {
55    |       ^^^^^
56
57 error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
58   --> $DIR/bad-mid-path-type-params.rs:39:36
59    |
60 LL |     let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
61    |                                    ^^^       --- help: remove this generic argument
62    |                                    |
63    |                                    expected 1 generic argument
64    |
65 note: associated function defined here, with 1 generic parameter: `U`
66   --> $DIR/bad-mid-path-type-params.rs:14:8
67    |
68 LL |     fn new<U>(x: T, y: U) -> Self;
69    |        ^^^ -
70
71 error: aborting due to 5 previous errors
72
73 For more information about this error, try `rustc --explain E0107`.