about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr
blob: 3ed6dc69d0b7bd07d00a8aa58e1d25e094b90f95 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
  --> $DIR/unsatisfied-const-trait-bound.rs:5:30
   |
LL | #![feature(const_trait_impl, generic_const_exprs)]
   |                              ^^^^^^^^^^^^^^^^^^^
   |
   = help: remove one of these features

error[E0391]: cycle detected when evaluating type-level constant
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
   |
note: ...which requires const-evaluating + checking `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires caching mir of `accept0::{constant#0}` for CTFE...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires elaborating drops for `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires borrow-checking `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires promoting constants in MIR for `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires const checking `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires building MIR for `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires building an abstract representation for `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires building THIR for `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
note: ...which requires type-checking `accept0::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
   = note: ...which again requires evaluating type-level constant, completing the cycle
note: cycle used when checking that `accept0` is well-formed
  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
   |
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
   |                                   ^^^^^^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when caching mir of `accept1::{constant#0}` for CTFE
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
   |
note: ...which requires elaborating drops for `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires borrow-checking `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires promoting constants in MIR for `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires const checking `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires building MIR for `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires building an abstract representation for `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires building THIR for `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires type-checking `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires evaluating type-level constant...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `accept1::{constant#0}`...
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
   = note: ...which again requires caching mir of `accept1::{constant#0}` for CTFE, completing the cycle
note: cycle used when const-evaluating + checking `accept1::{constant#0}`
  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
   |
LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
   |                                                 ^^^^^^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0391`.