1 error[E0106]: missing lifetime specifier
2 --> $DIR/unusual-rib-combinations.rs:24:15
4 LL | fn d<const C: S>() {}
5 | ^ expected named lifetime parameter
7 help: consider introducing a named lifetime parameter
9 LL | fn d<'a, const C: S<'a>>() {}
12 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
13 --> $DIR/unusual-rib-combinations.rs:7:16
15 LL | fn a() -> [u8; foo::()] {
16 | ^^^^^^^ only `Fn` traits may use parentheses
18 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
19 --> $DIR/unusual-rib-combinations.rs:14:15
21 LL | fn b<const C: u8()>() {}
22 | ^^^^ only `Fn` traits may use parentheses
24 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
25 --> $DIR/unusual-rib-combinations.rs:18:10
27 LL | fn c<T = u8()>() {}
28 | ^^^^ only `Fn` traits may use parentheses
30 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
31 --> $DIR/unusual-rib-combinations.rs:18:6
33 LL | fn c<T = u8()>() {}
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
40 error[E0308]: mismatched types
41 --> $DIR/unusual-rib-combinations.rs:7:16
43 LL | fn a() -> [u8; foo::()] {
44 | ^^^^^^^ expected `usize`, found fn item
46 = note: expected type `usize`
47 found fn item `fn() {foo}`
49 error: `S<'static>` is forbidden as the type of a const generic parameter
50 --> $DIR/unusual-rib-combinations.rs:24:15
52 LL | fn d<const C: S>() {}
55 = note: the only supported types are integers, `bool` and `char`
56 = help: more complex types are supported with `#![feature(adt_const_params)]`
58 error: aborting due to 7 previous errors
60 Some errors have detailed explanations: E0106, E0214, E0308.
61 For more information about an error, try `rustc --explain E0106`.