Compilation error
Created by: aleksander
With rustc 1.19.0-nightly (978d2cfee 2017-05-10) I got the following errors:
error[E0391]: unsupported cyclic reference between types/traits detected
--> src/support/bst/node.rs:47:5
|
47 | keys: [K; CAPACITY],
| ^^^^^^^^^^^^^^^^^^^ cyclic reference
|
note: the cycle begins when processing `support::bst::node::LeafNode::keys`...
--> src/support/bst/node.rs:47:5
|
47 | keys: [K; CAPACITY],
| ^^^^^^^^^^^^^^^^^^^
note: ...which then requires const-evaluating `support::bst::node::LeafNode::{{initializer}}`...
--> src/support/bst/node.rs:47:15
|
47 | keys: [K; CAPACITY],
| ^^^^^^^^
note: ...which then requires processing `support::bst::node::LeafNode::{{initializer}}`...
--> src/support/bst/node.rs:47:15
|
47 | keys: [K; CAPACITY],
| ^^^^^^^^
note: ...which then requires processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:47:15
|
47 | keys: [K; CAPACITY],
| ^^^^^^^^
note: ...which then requires processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:44:1
|
44 | pub const CAPACITY: usize = 2 * B - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which then requires processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:44:1
|
44 | pub const CAPACITY: usize = 2 * B - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which then requires coherence checking all impls of trait `std::ops::Mul`...
note: ...which then requires processing `geometry::Vector`...
--> src/geometry.rs:27:1
|
27 | / pub struct Vector<N> {
28 | | pub x: N,
29 | | pub y: N
30 | | }
| |_^
note: ...which then requires computing the variances for items in this crate...
= note: ...which then again requires processing `support::bst::node::LeafNode::keys`, completing the cycle.
error[E0391]: unsupported cyclic reference between types/traits detected
--> src/support/bst/node.rs:48:15
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^ cyclic reference
|
note: the cycle begins when processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:47:15
|
47 | keys: [K; CAPACITY],
| ^^^^^^^^
note: ...which then requires processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:44:1
|
44 | pub const CAPACITY: usize = 2 * B - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which then requires processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:44:1
|
44 | pub const CAPACITY: usize = 2 * B - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which then requires coherence checking all impls of trait `std::ops::Mul`...
note: ...which then requires processing `geometry::Vector`...
--> src/geometry.rs:27:1
|
27 | / pub struct Vector<N> {
28 | | pub x: N,
29 | | pub y: N
30 | | }
| |_^
note: ...which then requires computing the variances for items in this crate...
note: ...which then requires processing `support::bst::node::LeafNode::vals`...
--> src/support/bst/node.rs:48:5
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^^^^^^^^^^^^
note: ...which then requires const-evaluating `support::bst::node::LeafNode::{{initializer}}`...
--> src/support/bst/node.rs:48:15
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^
note: ...which then requires processing `support::bst::node::LeafNode::{{initializer}}`...
--> src/support/bst/node.rs:48:15
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^
= note: ...which then again requires processing `support::bst::node::CAPACITY`, completing the cycle.
error[E0391]: unsupported cyclic reference between types/traits detected
--> src/support/bst/node.rs:44:1
|
44 | pub const CAPACITY: usize = 2 * B - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
|
note: the cycle begins when processing `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:44:1
|
44 | pub const CAPACITY: usize = 2 * B - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which then requires coherence checking all impls of trait `std::ops::Mul`...
note: ...which then requires processing `geometry::Vector`...
--> src/geometry.rs:27:1
|
27 | / pub struct Vector<N> {
28 | | pub x: N,
29 | | pub y: N
30 | | }
| |_^
note: ...which then requires computing the variances for items in this crate...
note: ...which then requires processing `support::bst::node::LeafNode::vals`...
--> src/support/bst/node.rs:48:5
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^^^^^^^^^^^^
note: ...which then requires const-evaluating `support::bst::node::LeafNode::{{initializer}}`...
--> src/support/bst/node.rs:48:15
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^
note: ...which then requires const-evaluating `support::bst::node::CAPACITY`...
--> src/support/bst/node.rs:48:15
|
48 | vals: [V; CAPACITY],
| ^^^^^^^^
= note: ...which then again requires processing `support::bst::node::CAPACITY`, completing the cycle.