summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr
blob: 95f75c32186a0ff3c493dbd89a0454777cffbfd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
error: generic parameters may not be used in const operations
  --> $DIR/intrinsics-type_name-as-const-argument.rs:15:44
   |
LL |     T: Trait<{std::intrinsics::type_name::<T>()}>
   |                                            ^ cannot perform const operation using `T`
   |
   = note: type parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: `&'static str` is forbidden as the type of a const generic parameter
  --> $DIR/intrinsics-type_name-as-const-argument.rs:10:22
   |
LL | trait Trait<const S: &'static str> {}
   |                      ^^^^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types

error: aborting due to 2 previous errors