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

Unnecessary indentation for a commented block of code #2949

Closed
scampi opened this issue Aug 23, 2018 · 1 comment
Closed

Unnecessary indentation for a commented block of code #2949

scampi opened this issue Aug 23, 2018 · 1 comment

Comments

@scampi
Copy link
Contributor

scampi commented Aug 23, 2018

In PR #2925 an integration test on the packed_simd code base failed with the following:

Diff in /home/yfful/documents/code/rustfmt/packed_simd/src/api/from/from_vector.rs at line 18:
         }
 
         // FIXME: `Into::into` is not inline, but due to
-                                                // the blanket impl in `std`, which is not
-                                                // marked `default`, we cannot override it here with
-                                                // specialization.
-                                                /*
-                                                impl Into<$id> for $source {
-                                                    #[inline]
-                                                    fn into(self) -> $id {
-                                                        unsafe { simd_cast(self) }
-                                                    }
-                                                }
-                                                */
+                                                        // the blanket impl in `std`, which is not
+                                                        // marked `default`, we cannot override it here with
+                                                        // specialization.
+                                                        /*
+                                                        impl Into<$id> for $source {
+                                                            #[inline]
+                                                            fn into(self) -> $id {
+                                                                unsafe { simd_cast(self) }
+                                                            }
+                                                        }
+                                                        */

This can be seen when running cargo fmt --all -- --check against
rust-lang/packed_simd@1a6450d

The commented block should not have the extra indentation, i.e., it would be nicer if it were like below:

         }

         // FIXME: `Into::into` is not inline, but due to
         // the blanket impl in `std`, which is not
         // marked `default`, we cannot override it here with
         // specialization.
         /*
         impl Into<$id> for $source {
             #[inline]
             fn into(self) -> $id {
                 unsafe { simd_cast(self) }
             }
         }
         */
@scampi
Copy link
Contributor Author

scampi commented Sep 21, 2018

duplicate of #2917

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

No branches or pull requests

1 participant