Skip to content

Conversation

@topecongiro
Copy link
Contributor

This PR implements basic formatting against syntax::ast::Attribute.

Possible TODOs:

Closes #984, closes #1261, and closes #1462.

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

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

A minor question inline

src/visitor.rs Outdated
impl Rewrite for ast::MetaItem {
fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
Some(match self.node {
ast::MetaItemKind::Word => context.snippet(self.span),
Copy link
Member

Choose a reason for hiding this comment

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

could we use self.name 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.

I think we could.

@nrc
Copy link
Member

nrc commented Jun 6, 2017

Thank you!

@topecongiro topecongiro force-pushed the impl-rewrite-attribute branch from 1f1777c to 7be703a Compare June 6, 2017 04:56
@topecongiro
Copy link
Contributor Author

topecongiro commented Jun 6, 2017

Fixed typos and rebased (sub_width(1) to sub_width(2)).

@nrc nrc merged commit 8ac9245 into rust-lang:master Jun 6, 2017
@topecongiro topecongiro deleted the impl-rewrite-attribute branch June 6, 2017 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants