error[E0277]: `Adapt<&[f64; 2]>` implements `Point` but not `PointMut`, and this algorithm needs to construct a point
--> tests/ui/readonly_envelope.rs:13:22
|
13 | let _ = envelope(&a);
| -------- ^^ implement `PointMut` for this type, or feed the algorithm a mutable point type instead
| |
| required by a bound introduced by this call
|
= help: the trait `PointMut` is not implemented for `Adapt<&[f64; 2]>`
= note: see `geometry_trait::PointMut` — adds `set::<D>` next to the inherited `get::<D>`. Algorithms that only read coordinates (distance, length, area, within, intersects, equals, comparable_distance) require `Point` only — this bound is reached when the algorithm needs to *output* a Point (envelope, segment_start, box_min, …).
help: the following other types implement trait `PointMut`
--> $WORKSPACE/crates/geometry-adapt/src/adapt_array.rs
|
| impl<T: CoordinateScalar, const N: usize> PointMut for Adapt<[T; N]> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Adapt<[T; N]>`
|
::: $WORKSPACE/crates/geometry-adapt/src/adapt_tuple.rs
|
| impl<T: CoordinateScalar> PointMut for Adapt<(T, T)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Adapt<(T, T)>`
...
| impl<T: CoordinateScalar> PointMut for Adapt<(T, T, T)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Adapt<(T, T, T)>`
= note: required for `EnvelopePoint` to implement `EnvelopeStrategy<Adapt<&[f64; 2]>>`
note: required by a bound in `boost_geometry::algorithm::envelope`
--> $WORKSPACE/crates/geometry-algorithm/src/envelope.rs
|
| pub fn envelope<G>(
| -------- required by a bound in this function
...
| <G::Kind as EnvelopeStrategyForKind>::S: EnvelopeStrategy<G>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `envelope`
error[E0277]: the trait bound `&[f64; 2]: Default` is not satisfied
--> tests/ui/readonly_envelope.rs:13:22
|
13 | let _ = envelope(&a);
| -------- ^^ the trait `Default` is not implemented for `&[f64; 2]`
| |
| required by a bound introduced by this call
|
= note: required for `Adapt<&[f64; 2]>` to implement `Default`
= note: required for `EnvelopePoint` to implement `EnvelopeStrategy<Adapt<&[f64; 2]>>`
note: required by a bound in `boost_geometry::algorithm::envelope`
--> $WORKSPACE/crates/geometry-algorithm/src/envelope.rs
|
| pub fn envelope<G>(
| -------- required by a bound in this function
...
| <G::Kind as EnvelopeStrategyForKind>::S: EnvelopeStrategy<G>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `envelope`
help: consider removing the leading `&`-reference
|
13 - let _ = envelope(&a);
13 + let _ = envelope(a);
|
error[E0277]: `Adapt<&[f64; 2]>` implements `Point` but not `PointMut`, and this algorithm needs to construct a point
--> tests/ui/readonly_envelope.rs:13:13
|
13 | let _ = envelope(&a);
| ^^^^^^^^^^^^ implement `PointMut` for this type, or feed the algorithm a mutable point type instead
|
= help: the trait `PointMut` is not implemented for `Adapt<&[f64; 2]>`
= note: see `geometry_trait::PointMut` — adds `set::<D>` next to the inherited `get::<D>`. Algorithms that only read coordinates (distance, length, area, within, intersects, equals, comparable_distance) require `Point` only — this bound is reached when the algorithm needs to *output* a Point (envelope, segment_start, box_min, …).
help: the following other types implement trait `PointMut`
--> $WORKSPACE/crates/geometry-adapt/src/adapt_array.rs
|
| impl<T: CoordinateScalar, const N: usize> PointMut for Adapt<[T; N]> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Adapt<[T; N]>`
|
::: $WORKSPACE/crates/geometry-adapt/src/adapt_tuple.rs
|
| impl<T: CoordinateScalar> PointMut for Adapt<(T, T)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Adapt<(T, T)>`
...
| impl<T: CoordinateScalar> PointMut for Adapt<(T, T, T)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Adapt<(T, T, T)>`
= note: required for `EnvelopePoint` to implement `EnvelopeStrategy<Adapt<&[f64; 2]>>`
error[E0277]: the trait bound `&[f64; 2]: Default` is not satisfied
--> tests/ui/readonly_envelope.rs:13:13
|
13 | let _ = envelope(&a);
| ^^^^^^^^^^^^ the trait `Default` is not implemented for `&[f64; 2]`
|
= help: the following other types implement trait `Default`:
&[T]
&mut [T]
[T; 0]
[T; 1]
[T; 2]
[T; 3]
[T; 4]
[T; 5]
and $N others
= note: required for `Adapt<&[f64; 2]>` to implement `Default`
= note: required for `EnvelopePoint` to implement `EnvelopeStrategy<Adapt<&[f64; 2]>>`