rust/tests/ui/array-slice-vec/vector-no-ann.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
420 B
Plaintext
Raw Normal View History

error[E0282]: type annotations needed for `Vec<T>`
2022-02-14 06:25:26 -06:00
--> $DIR/vector-no-ann.rs:2:9
|
2018-02-22 18:42:32 -06:00
LL | let _foo = Vec::new();
2022-02-14 06:25:26 -06:00
| ^^^^
|
help: consider giving `_foo` an explicit type, where the type for type parameter `T` is specified
|
LL | let _foo: Vec<T> = Vec::new();
| ++++++++
error: aborting due to previous error
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0282`.