Skip to content

rustfmt did not remove the empty line between function call arguments #1172

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
srinivasreddy opened this issue Sep 26, 2016 · 1 comment
Closed

Comments

@srinivasreddy
Copy link
Contributor

                                self.impl_or_trait_item(
-                                    self.tcx.impl_trait_ref(impl_did).unwrap().def_id,
-
-                                    item_name
-                                )
-                            }).unwrap();
-                        let note_span = self.tcx.map.span_if_local(item.def_id()).or_else(|| {
-                            self.tcx.map.span_if_local(impl_did)
-                        });
+                                self.impl_or_trait_item(self.tcx
+                                                            .impl_trait_ref(impl_did)
+                                                            .unwrap()
+                                                            .def_id,
+
+                                                        item_name)
+                            })
+                            .unwrap();
+                        let note_span = self.tcx
+                            .map
+                            .span_if_local(item.def_id())
+                            .or_else(|| self.tcx.map.span_if_local(impl_did));

see the item_name param.

https://github.com/rust-lang/rust/pull/36736/files/1d1168ccea6ee1ede476cefb424c384ba7904bb5#diff-45ff4c3ed02cc75f5b8162af5d9c782bL98

@nrc
Copy link
Member

nrc commented Oct 11, 2016

I think this is indicative of a wider policy where we don't remove excess newlines in case they are signalling something. However, I think we should only do this between statements, not within an expression.

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

No branches or pull requests

2 participants