Skip to content

Commit 9da02e1

Browse files
committed
w
1 parent cb24d94 commit 9da02e1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

vision/status_quo/nalgebra.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,18 @@ For this impl to bind `R` and `C`, the expression `Dim::Const(N)` has to bind `N
126126
This is sound as constructors are injective. It seems very desirable to at least
127127
enable this for expressions using constructors.
128128

129-
See [this playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=4b0b726922ee3dcba4fd6066c048af2f) for a complete example.
129+
Without this, one gets an error message like the following:
130+
```
131+
error[E0207]: the const parameter `R` is not constrained by the impl trait, self type, or predicates
132+
--> src/lib.rs:5:12
133+
|
134+
5 | impl<T, const R: usize, const C: usize> for SMatrix<T, R, C> {
135+
| ^ unconstrained const parameter
136+
|
137+
= note: expressions using a const parameter must map each value to a distinct output value
138+
= note: only used in the expression `Dim::Const(R)`
139+
= note: proving the result of expressions other than the parameter are unique is not supported
140+
```
130141

131142
### Merge partial impls to be exhaustive
132143

0 commit comments

Comments
 (0)