rust/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr

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

65 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-12-15 20:03:25 +00:00
error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:7:23
|
LL | let v : Vec<(u32,_) = vec![];
| - ^ expected one of `,`, `:`, or `>`
| |
| while parsing the type for `v`
|
help: you might have meant to end the type parameters here
|
LL | let v : Vec<(u32,_)> = vec![];
| +
2020-12-15 20:03:25 +00:00
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `{`
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:13:32
|
LL | let foo : Foo::<T1, T2 = Foo {_a : arg1, _b : arg2};
| - ^ expected one of 7 possible tokens
| |
| while parsing the type for `foo`
|
help: you might have meant to end the type parameters here
|
LL | let foo : Foo::<T1>, T2 = Foo {_a : arg1, _b : arg2};
| +
2020-12-15 20:03:25 +00:00
error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:18:18
|
LL | let v : Vec<'a = vec![];
| - ^ expected one of `,`, `:`, or `>`
| |
| while parsing the type for `v`
|
help: you might have meant to end the type parameters here
|
LL | let v : Vec<'a> = vec![];
| +
2020-12-15 20:03:25 +00:00
error[E0282]: type annotations needed for `Vec<_>`
2022-02-14 12:25:26 +00:00
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:7:7
2020-12-15 20:03:25 +00:00
|
LL | let v : Vec<(u32,_) = vec![];
| ^ ------ type must be known at this point
2022-02-14 12:25:26 +00:00
|
help: consider giving `v` an explicit type, where the placeholders `_` are specified
2020-12-15 20:03:25 +00:00
|
LL | let v: Vec<_> : Vec<(u32,_) = vec![];
2022-02-14 12:25:26 +00:00
| ++++++++
2020-12-15 20:03:25 +00:00
error[E0282]: type annotations needed for `Vec<_>`
2022-02-14 12:25:26 +00:00
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:18:7
2020-12-15 20:03:25 +00:00
|
LL | let v : Vec<'a = vec![];
| ^ ------ type must be known at this point
2022-02-14 12:25:26 +00:00
|
help: consider giving `v` an explicit type, where the placeholders `_` are specified
2020-12-15 20:03:25 +00:00
|
LL | let v: Vec<_> : Vec<'a = vec![];
2022-02-14 12:25:26 +00:00
| ++++++++
2020-12-15 20:03:25 +00:00
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0282`.