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

Option to not insert spaces at beginning of comment lines #1224

Closed
seanmonstar opened this issue Nov 22, 2016 · 1 comment
Closed

Option to not insert spaces at beginning of comment lines #1224

seanmonstar opened this issue Nov 22, 2016 · 1 comment
Labels
a-comments only-with-option requires a non-default option value to reproduce

Comments

@seanmonstar
Copy link

Examples:

-//TODO something
+// TODO something

-//debug!("{}", foo);
+// debug!("{}", foo);

I'd prefer to tell rustfmt to just leave those comments alone.

@dhardy
Copy link

dhardy commented Nov 25, 2016

Seems a bit odd that it will do this when it doesn't remove spaces inside comments. Because it also does this (note that my editor puts the // at the start of the line when I tell it to comment-out code, then rustfmt indents again instead of just moving the //):

 fn foo() {
-//    do_something();
+    //    do_something();
     another_fn_call()
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments only-with-option requires a non-default option value to reproduce
Projects
None yet
Development

No branches or pull requests

3 participants