f22bc2d3ff
Given ``` mented on Jan 26, 2015 • trait Foo { fn method(&self) {} } fn call_method<T>(x: &T) { x.method() } ``` suggest constraining `T` with `Foo`.
16 lines
634 B
Plaintext
16 lines
634 B
Plaintext
error[E0599]: no function or associated item named `dim` found for type `D` in the current scope
|
|
--> $DIR/issue-39559.rs:14:21
|
|
|
|
|
LL | entries: [T; D::dim()],
|
|
| ^^^ function or associated item not found in `D`
|
|
|
|
|
= help: items from traits can only be used if the type parameter is bounded by the trait
|
|
help: the following trait defines an item `dim`, perhaps you need to restrict type parameter `D` with it:
|
|
|
|
|
LL | pub struct Vector<T, D: Dim + Dim> {
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|