Skip to content

Eats r#try! -> try! in macros #4138

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

Closed
Mark-Simulacrum opened this issue Apr 23, 2020 · 4 comments
Closed

Eats r#try! -> try! in macros #4138

Mark-Simulacrum opened this issue Apr 23, 2020 · 4 comments

Comments

@Mark-Simulacrum
Copy link
Member

I've not had time to do a lot of debugging here, but when doing an update of rustfmt in Rust (see the linked PR) we encountered a bug that rustfmt will apparently replace r#try! with try!, which is not an acceptable change to make on 2018 edition code. I've not attempted a reproduction outside of that one instance -- if this doesn't easily reproduce I'm not too worried by it.

We've fixed this in rust-lang/rust I believe with a manual #[rustfmt::skip] annotation.

Originally posted by @jonas-schievink in https://github.com/_render_node/MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDQxMzM3MzI4OA==/comments/review_comment

@topecongiro
Copy link
Contributor

Thank you for the report, though the link seems to be broken.

@calebcartwright
Copy link
Member

GitHub is being weird with the links, but I believe this is it: rust-lang/rust#71439 (comment)

@topecongiro
Copy link
Contributor

@calebcartwright Thanks!

@Mark-Simulacrum I am not sure how the rustc repository uses rustfmt, but it seems that rustfmt is using edition 2015 to format the file.

@Mark-Simulacrum
Copy link
Member Author

Ah, I think it might've actually been a bug with my editor configuration. Sorry for the noise!

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

No branches or pull requests

3 participants