]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/substs-ppaux.verbose.stderr
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / ui / associated-types / substs-ppaux.verbose.stderr
1 error[E0308]: mismatched types
2   --> $DIR/substs-ppaux.rs:16:17
3    |
4 LL |     fn bar<'a, T>() where T: 'a {}
5    |     --------------------------- associated function `bar` defined here
6 ...
7 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
8    |            --   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
9    |            |
10    |            expected due to this
11    |
12    = note: expected unit type `()`
13                 found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
14 help: use parentheses to call this associated function
15    |
16 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>();
17    |                                                                         ++
18
19 error[E0308]: mismatched types
20   --> $DIR/substs-ppaux.rs:25:17
21    |
22 LL |     fn bar<'a, T>() where T: 'a {}
23    |     --------------------------- associated function `bar` defined here
24 ...
25 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
26    |            --   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
27    |            |
28    |            expected due to this
29    |
30    = note: expected unit type `()`
31                 found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
32 help: use parentheses to call this associated function
33    |
34 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>();
35    |                                                                          ++
36
37 error[E0308]: mismatched types
38   --> $DIR/substs-ppaux.rs:33:17
39    |
40 LL |     fn baz() {}
41    |     -------- associated function `baz` defined here
42 ...
43 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
44    |            --   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
45    |            |
46    |            expected due to this
47    |
48    = note: expected unit type `()`
49                 found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
50 help: use parentheses to call this associated function
51    |
52 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz();
53    |                                                        ++
54
55 error[E0308]: mismatched types
56   --> $DIR/substs-ppaux.rs:41:17
57    |
58 LL | fn foo<'z>() where &'z (): Sized {
59    | -------------------------------- function `foo` defined here
60 ...
61 LL |     let x: () = foo::<'static>;
62    |            --   ^^^^^^^^^^^^^^ expected `()`, found fn item
63    |            |
64    |            expected due to this
65    |
66    = note: expected unit type `()`
67                 found fn item `fn() {foo::<ReStatic>}`
68 help: use parentheses to call this function
69    |
70 LL |     let x: () = foo::<'static>();
71    |                               ++
72
73 error[E0277]: the size for values of type `str` cannot be known at compilation time
74   --> $DIR/substs-ppaux.rs:49:5
75    |
76 LL |     <str as Foo<u8>>::bar;
77    |     ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
78    |
79    = help: the trait `Sized` is not implemented for `str`
80 note: required for `str` to implement `Foo<'_#0r, '_#1r, u8>`
81   --> $DIR/substs-ppaux.rs:11:17
82    |
83 LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
84    |            -    ^^^^^^^^^^^^^^     ^
85    |            |
86    |            unsatisfied trait bound introduced here
87
88 error: aborting due to 5 previous errors
89
90 Some errors have detailed explanations: E0277, E0308.
91 For more information about an error, try `rustc --explain E0277`.