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

rustfmt on metadata folder #37349

Merged
merged 1 commit into from
Oct 25, 2016
Merged

rustfmt on metadata folder #37349

merged 1 commit into from
Oct 25, 2016

Conversation

srinivasreddy
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@srinivasreddy
Copy link
Contributor Author

@nikomatsakis LGTM. What do you think?

@eddyb
Copy link
Member

eddyb commented Oct 22, 2016

Didn't you already do this in #37350?

@srinivasreddy
Copy link
Contributor Author

I split the folder into two PRs since it is huge

@eddyb
Copy link
Member

eddyb commented Oct 22, 2016

@srinivasreddy There's no size limit to GitHub PRs and it's not helpful to have related changes split.

Also, you'll likely have to wait for #37301 to get merged, in order to not have conflicts.

@srinivasreddy
Copy link
Contributor Author

@eddyb I know that. I just wanted to avoid merge conflicts with merged PRs in between. 😄

pub fn find_plugin_registrar(&mut self, span: Span, name: &str)
pub fn find_plugin_registrar(&mut self,
span: Span,
name: &str)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason rustfmt gives each argument its own line here?
I think it just wastes vertical space without helping readability.

ident: name.to_string(),
id: ast::DUMMY_NODE_ID,
should_link: false,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, the massive rightward drift here is ugly -- I think the original formatting looks much nicer.

None,
item.span,
PathKind::Crate,
true);
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer the original formatting here.

@@ -215,20 +217,25 @@ impl CStore {
// In order to get this left-to-right dependency ordering, we perform a
// topological sort of all crates putting the leaves at the right-most
// positions.
pub fn do_get_used_crates(&self, prefer: LinkagePreference)
pub fn do_get_used_crates(&self,
prefer: LinkagePreference)
Copy link
Contributor

Choose a reason for hiding this comment

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

(also here -- no need for the added line break)

id, self.from_id_range, self.to_id_range);
id,
self.from_id_range,
self.to_id_range);
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, this is more readable as it was with the arguments one one line.

debug!("evaluating the type of {:?}::{:?}", variant.name, field.name);
debug!("evaluating the type of {:?}::{:?}",
variant.name,
field.name);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why rustfmt breaks up this line...

variant.name, field.name, ty);
variant.name,
field.name,
ty);
Copy link
Contributor

Choose a reason for hiding this comment

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

(same here -- I think this is more readable as it was with these arguments on one line)

});
}
}
continue;
}
EntryKind::Impl(_) | EntryKind::DefaultImpl(_) => continue,
EntryKind::Impl(_) |
EntryKind::DefaultImpl(_) => continue,
Copy link
Contributor

Choose a reason for hiding this comment

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

Needless line break.

callback(def::Export {
def: ctor_def,
name: name,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is more readable as it was (I think of the struct's fields as named arguments here).

end_pos,
lines,
multibyte_chars,
.. } = filemap_to_import;
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO this looked much nicer before with block indenting and a newline after the {.

@bors
Copy link
Contributor

bors commented Oct 23, 2016

☔ The latest upstream changes (presumably #37301) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

@jseyfried I suggest you open some issues on rustfmt =)

@nikomatsakis
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 24, 2016

📌 Commit cac3e5a has been approved by nikomatsakis

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Oct 24, 2016
bors added a commit that referenced this pull request Oct 24, 2016
Rollup of 7 pull requests

- Successful merges: #37228, #37304, #37324, #37328, #37336, #37349, #37372
- Failed merges:
@bors bors merged commit cac3e5a into rust-lang:master Oct 25, 2016
@srinivasreddy srinivasreddy deleted the meta_1 branch October 25, 2016 03:12
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

Successfully merging this pull request may close these issues.

6 participants