]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / type-alias-impl-trait / generic_nondefining_use.stderr
1 error: non-defining opaque type use in defining scope
2   --> $DIR/generic_nondefining_use.rs:14:21
3    |
4 LL | fn concrete_ty() -> OneTy<u32> {
5    |                     ^^^^^^^^^^
6    |
7 note: used non-generic type `u32` for generic parameter
8   --> $DIR/generic_nondefining_use.rs:8:12
9    |
10 LL | type OneTy<T> = impl Debug;
11    |            ^
12
13 error: non-defining opaque type use in defining scope
14   --> $DIR/generic_nondefining_use.rs:19:27
15    |
16 LL | type OneLifetime<'a> = impl Debug;
17    |                  -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
18 ...
19 LL | fn concrete_lifetime() -> OneLifetime<'static> {
20    |                           ^^^^^^^^^^^^^^^^^^^^
21
22 error: non-defining opaque type use in defining scope
23   --> $DIR/generic_nondefining_use.rs:24:24
24    |
25 LL | fn concrete_const() -> OneConst<{123}> {
26    |                        ^^^^^^^^^^^^^^^
27    |
28 note: used non-generic constant `{123}` for generic parameter
29   --> $DIR/generic_nondefining_use.rs:10:21
30    |
31 LL | type OneConst<const X: usize> = impl Debug;
32    |                     ^
33
34 error: aborting due to 3 previous errors
35