about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/conditionally-const-in-anon-const.stderr
blob: c6be249b95a220608237372763a1f03c0327bebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
error: `[const]` is not allowed here
  --> $DIR/conditionally-const-in-anon-const.rs:14:25
   |
LL |             struct I<U: [const] Trait<0>>(U);
   |                         ^^^^^^^
   |
note: structs cannot have `[const]` trait bounds
  --> $DIR/conditionally-const-in-anon-const.rs:14:13
   |
LL |             struct I<U: [const] Trait<0>>(U);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: `[const]` is not allowed here
  --> $DIR/conditionally-const-in-anon-const.rs:17:26
   |
LL |             let x: &impl [const] Trait<0> = &();
   |                          ^^^^^^^
   |
note: anonymous constants cannot have `[const]` trait bounds
  --> $DIR/conditionally-const-in-anon-const.rs:11:9
   |
LL | /         {
LL | |             const fn g<U: [const] Trait<0>>() {}
LL | |
LL | |             struct I<U: [const] Trait<0>>(U);
...  |
LL | |             0
LL | |         },
   | |_________^

error: aborting due to 2 previous errors