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

Format inner attributes #4207

Merged
merged 5 commits into from
May 26, 2020

Conversation

topecongiro
Copy link
Contributor

Close #4206.

@@ -178,7 +220,6 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
fn insert_sub_mod(
&mut self,
sub_mod_kind: SubModKind<'c, 'ast>,
_sub_mod: Cow<'ast, ast::Mod>,
Copy link
Member

Choose a reason for hiding this comment

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

Oops! I made this change during a previous rustc-ap-* round to get the code compiling again and forgot to remove this after 🤦‍♂️

// FIXME(topecongiro) Format inner attributes (#3606).
match Parser::parse_inner_attrs(&mut parser) {
Ok(_attrs) => (),
match parser.parse_mod(&TokenKind::Eof) {
Copy link
Member

Choose a reason for hiding this comment

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

much simpler! ❤️

let mut ignore_builder = GitignoreBuilder::new(ignore_list.rustfmt_toml_path());
let root = ignore_list
.rustfmt_toml_path()
.parent()
Copy link
Member

Choose a reason for hiding this comment

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

why the parent here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at this CI failure, I noticed that we are ought to pass a directory to GitignoreBuilder::new, hence this change.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

one inline question for my own edification, but changes LGTM!

@topecongiro topecongiro merged commit 2b8d4fd into rust-lang:master May 26, 2020
@topecongiro topecongiro deleted the inner-rustfmt-skip-ignored branch May 26, 2020 08:48
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.

rustfmt ignores #![rustfmt::skip] when run with -r
3 participants