]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/unusual-rib-combinations.stderr
Auto merge of #101703 - nicholasbishop:bishop-add-uefi-ci-2, r=jyn514
[rust.git] / src / test / ui / lifetimes / unusual-rib-combinations.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/unusual-rib-combinations.rs:24:15
3    |
4 LL | fn d<const C: S>() {}
5    |               ^ expected named lifetime parameter
6    |
7 help: consider introducing a named lifetime parameter
8    |
9 LL | fn d<'a, const C: S<'a>>() {}
10    |      +++           ++++
11
12 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
13   --> $DIR/unusual-rib-combinations.rs:7:16
14    |
15 LL | fn a() -> [u8; foo::()] {
16    |                ^^^^^^^ only `Fn` traits may use parentheses
17
18 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
19   --> $DIR/unusual-rib-combinations.rs:14:15
20    |
21 LL | fn b<const C: u8()>() {}
22    |               ^^^^ only `Fn` traits may use parentheses
23
24 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
25   --> $DIR/unusual-rib-combinations.rs:18:10
26    |
27 LL | fn c<T = u8()>() {}
28    |          ^^^^ only `Fn` traits may use parentheses
29
30 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
31   --> $DIR/unusual-rib-combinations.rs:18:6
32    |
33 LL | fn c<T = u8()>() {}
34    |      ^^^^^^^^
35    |
36    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
37    = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
38    = note: `#[deny(invalid_type_param_default)]` on by default
39
40 error[E0308]: mismatched types
41   --> $DIR/unusual-rib-combinations.rs:7:16
42    |
43 LL | fn a() -> [u8; foo::()] {
44    |                ^^^^^^^ expected `usize`, found fn item
45    |
46    = note: expected type `usize`
47            found fn item `fn() {foo}`
48
49 error: `S<'static>` is forbidden as the type of a const generic parameter
50   --> $DIR/unusual-rib-combinations.rs:24:15
51    |
52 LL | fn d<const C: S>() {}
53    |               ^
54    |
55    = note: the only supported types are integers, `bool` and `char`
56    = help: more complex types are supported with `#![feature(adt_const_params)]`
57
58 error: aborting due to 7 previous errors
59
60 Some errors have detailed explanations: E0106, E0214, E0308.
61 For more information about an error, try `rustc --explain E0106`.