Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slight breakage by Rust 2021 Edition #308

Closed
SorteKanin opened this issue Oct 31, 2021 · 2 comments · Fixed by #309
Closed

Very slight breakage by Rust 2021 Edition #308

SorteKanin opened this issue Oct 31, 2021 · 2 comments · Fixed by #309
Assignees

Comments

@SorteKanin
Copy link

SorteKanin commented Oct 31, 2021

Rust 2021 has reserved the prefix#identifier syntax. This causes the following to fail to compile

use maud::html;

fn main() {
    let markup = html! {
        div#my-id {}
    };
}

because div#my-id uses the reserved syntax.

The easy fix is just to add a space between the tokens: div #my-id. Not very significant but the examples on the website should perhaps be updated with a note about Rust 2021.

@lambda-fairy
Copy link
Owner

Thanks!

Yeah, I have the changes for this locally. Just need to clean it up.

I'll assign myself in the meantime.

@lambda-fairy
Copy link
Owner

BTW, the docs on main mention some unreleased features (#283). So to avoid confusion, I'll hold off on deploying the docs changes until I cut a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants