Skip to content

"error: expected one of ,, ., ?, or an operator" list is incomplete #38777

Closed
@Timmmm

Description

@Timmmm

Take this real code I just wrote:

	let text = Text::new()
					.set("x", 200) 
					.set("y", lifetime.starting_line*20 + 20)
					.set("class", "annotation")
					.add(svg::node::Text::new(markdown::to_html(&lifetime.markdown));

It gives this error:

note: unclosed delimiter
   --> src\main.rs:142:11
    |
142 | 						.add(svg::node::Text::new(markdown::to_html(&lifetime.markdown));
    | 						    ^

error: expected one of `,`, `.`, `?`, or an operator, found `;`
   --> src\main.rs:142:71
    |
142 | 						.add(svg::node::Text::new(markdown::to_html(&lifetime.markdown));
    | 						                                                                ^

Ok so it does give me a note about an unclosed delimiter, but the actual error says

error: expected one of `,`, `.`, `?`, or an operator, found `;`

I'm pretty sure ) isn't an operator, so isn't that list wrong? Shouldn't it say

error: expected one of `,`, `.`, `?`, `)`, or an operator, found `;`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions