Skip to content

fix 'fails with conditional paths that include' #3955

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

Merged
merged 4 commits into from
Dec 9, 2019

Conversation

rchaser53
Copy link
Contributor

fix: #3933

@@ -31,7 +31,12 @@ macro_rules! span_with_attrs_lo_hi {
if attrs.is_empty() {
mk_sp($lo, $hi)
} else {
mk_sp(attrs[0].span.lo(), $hi)
// this path is already gone at latest rust-ap-* 627.0.0
if attrs[0].item.path.to_string() == "warn_directory_ownership" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, does this mean that the rustc parser is adding an attribute internally to the AST node? That is...surprising 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But it will be deleted at the current version rust-ap-*. Maybe because it's not good for AST.

@topecongiro topecongiro merged commit a178776 into rust-lang:master Dec 9, 2019
@rchaser53 rchaser53 deleted the issue-3933 branch December 9, 2019 13:39
@ytmimi
Copy link
Contributor

ytmimi commented Apr 6, 2022

I'm unable to reproduce the issue with the latest master rustfmt 1.4.38-nightly (7d6ca7c3 2022-04-02). I don't think this needs to be backported.

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

Successfully merging this pull request may close these issues.

fails with conditional paths that include -
4 participants