]> git.lizzy.rs Git - rust.git/blob - src/test/ui/substs-ppaux.normal.stderr
Update tests for GATs
[rust.git] / src / test / ui / substs-ppaux.normal.stderr
1 error[E0308]: mismatched types
2   --> $DIR/substs-ppaux.rs:16:17
3    |
4 LL |     fn bar<'a, T>() where T: 'a {}
5    |     --------------------------- fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>} defined here
6 ...
7 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
8    |            --   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9    |            |    |
10    |            |    expected `()`, found fn item
11    |            |    help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>()`
12    |            expected due to this
13    |
14    = note: expected unit type `()`
15                 found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
16
17 error[E0308]: mismatched types
18   --> $DIR/substs-ppaux.rs:25:17
19    |
20 LL |     fn bar<'a, T>() where T: 'a {}
21    |     --------------------------- fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>} defined here
22 ...
23 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
24    |            --   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25    |            |    |
26    |            |    expected `()`, found fn item
27    |            |    help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>()`
28    |            expected due to this
29    |
30    = note: expected unit type `()`
31                 found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
32
33 error[E0308]: mismatched types
34   --> $DIR/substs-ppaux.rs:33:17
35    |
36 LL |     fn baz() {}
37    |     -------- fn() {<i8 as Foo<'static, 'static, u8>>::baz} defined here
38 ...
39 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
40    |            --   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41    |            |    |
42    |            |    expected `()`, found fn item
43    |            |    help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::baz()`
44    |            expected due to this
45    |
46    = note: expected unit type `()`
47                 found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
48
49 error[E0308]: mismatched types
50   --> $DIR/substs-ppaux.rs:41:17
51    |
52 LL | fn foo<'z>() where &'z (): Sized {
53    | -------------------------------- fn() {foo::<'static>} defined here
54 ...
55 LL |     let x: () = foo::<'static>;
56    |            --   ^^^^^^^^^^^^^^
57    |            |    |
58    |            |    expected `()`, found fn item
59    |            |    help: use parentheses to call this function: `foo::<'static>()`
60    |            expected due to this
61    |
62    = note: expected unit type `()`
63                 found fn item `fn() {foo::<'static>}`
64
65 error[E0277]: the size for values of type `str` cannot be known at compilation time
66   --> $DIR/substs-ppaux.rs:49:5
67    |
68 LL |     fn bar<'a, T>() where T: 'a {}
69    |        ---                   -- required by this bound in `Foo::bar`
70 ...
71 LL |     <str as Foo<u8>>::bar;
72    |     ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
73    |
74    = help: the trait `std::marker::Sized` is not implemented for `str`
75    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
76    = note: required because of the requirements on the impl of `Foo<'_, '_, u8>` for `str`
77
78 error: aborting due to 5 previous errors
79
80 Some errors have detailed explanations: E0277, E0308.
81 For more information about an error, try `rustc --explain E0277`.