fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0106]: missing lifetime specifier 2 --> $DIR/unusual-rib-combinations.rs:24:15 3 | 4LL | fn d<const C: S>() {} 5 | ^ expected named lifetime parameter 6 7error[E0770]: the type of const parameters must not depend on other generic parameters 8 --> $DIR/unusual-rib-combinations.rs:29:22 9 | 10LL | struct Bar<const N: &'a (dyn for<'a> Foo<'a>)>; 11 | ^^ the type must not depend on the parameter `'a` 12 | 13 = note: lifetime parameters may not be used in the type of const parameters 14 15error[E0214]: parenthesized type parameters may only be used with a `Fn` trait 16 --> $DIR/unusual-rib-combinations.rs:7:16 17 | 18LL | fn a() -> [u8; foo::()] { 19 | ^^^^^^^ only `Fn` traits may use parentheses 20 21error[E0214]: parenthesized type parameters may only be used with a `Fn` trait 22 --> $DIR/unusual-rib-combinations.rs:14:15 23 | 24LL | fn b<const C: u8()>() {} 25 | ^^^^ only `Fn` traits may use parentheses 26 27error[E0214]: parenthesized type parameters may only be used with a `Fn` trait 28 --> $DIR/unusual-rib-combinations.rs:18:10 29 | 30LL | fn c<T = u8()>() {} 31 | ^^^^ only `Fn` traits may use parentheses 32 33error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions 34 --> $DIR/unusual-rib-combinations.rs:18:6 35 | 36LL | fn c<T = u8()>() {} 37 | ^^^^^^^^ 38 | 39 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 40 = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> 41 = note: `#[deny(invalid_type_param_default)]` on by default 42 43error[E0308]: mismatched types 44 --> $DIR/unusual-rib-combinations.rs:7:16 45 | 46LL | fn a() -> [u8; foo::()] { 47 | ^^^^^^^ expected `usize`, found fn item 48 | 49 = note: expected type `usize` 50 found fn item `fn() {foo}` 51 52error: `S<'_>` is forbidden as the type of a const generic parameter 53 --> $DIR/unusual-rib-combinations.rs:24:15 54 | 55LL | fn d<const C: S>() {} 56 | ^ 57 | 58 = note: the only supported types are integers, `bool` and `char` 59 = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types 60 61error: `&dyn for<'a> Foo<'a>` is forbidden as the type of a const generic parameter 62 --> $DIR/unusual-rib-combinations.rs:29:21 63 | 64LL | struct Bar<const N: &'a (dyn for<'a> Foo<'a>)>; 65 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 66 | 67 = note: the only supported types are integers, `bool` and `char` 68 = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types 69 70error: aborting due to 9 previous errors 71 72Some errors have detailed explanations: E0106, E0214, E0308, E0770. 73For more information about an error, try `rustc --explain E0106`.