]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / intrinsics-type_name-as-const-argument.min.stderr
1 error: generic parameters may not be used in const operations
2   --> $DIR/intrinsics-type_name-as-const-argument.rs:15:44
3    |
4 LL |     T: Trait<{std::intrinsics::type_name::<T>()}>
5    |                                            ^ cannot perform const operation using `T`
6    |
7    = note: type parameters may not be used in const expressions
8    = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
9
10 error: `&'static str` is forbidden as the type of a const generic parameter
11   --> $DIR/intrinsics-type_name-as-const-argument.rs:10:22
12    |
13 LL | trait Trait<const S: &'static str> {}
14    |                      ^^^^^^^^^^^^
15    |
16    = note: the only supported types are integers, `bool` and `char`
17    = help: more complex types are supported with `#[feature(const_generics)]`
18
19 error: aborting due to 2 previous errors
20