Skip to content

Comments with lots of /s should not have spaces inserted #652

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
nrc opened this issue Nov 23, 2015 · 4 comments
Closed

Comments with lots of /s should not have spaces inserted #652

nrc opened this issue Nov 23, 2015 · 4 comments
Labels
a-comments bug Panic, non-idempotency, invalid code, etc. only-with-option requires a non-default option value to reproduce

Comments

@nrc
Copy link
Member

nrc commented Nov 23, 2015

e.g.,

-////////////////////////////////////////////////////////////////////////////////
-// Basic slice extension methods
-////////////////////////////////////////////////////////////////////////////////
+/// /////////////////////////////////////////////////////////////////////////////
+/// Basic slice extension methods
+/// /////////////////////////////////////////////////////////////////////////////

Note that we're changing a regular comment to a doc comment here too

@nrc nrc added bug Panic, non-idempotency, invalid code, etc. a-comments labels Nov 23, 2015
@nrc nrc added this to the 1.0 milestone Apr 6, 2016
@marcusklaas marcusklaas self-assigned this Apr 18, 2016
@marcusklaas
Copy link
Contributor

My lord, I forgot how much of a mess the comment code is 😱

@crumblingstatue
Copy link
Contributor

crumblingstatue commented May 13, 2016

Might not be the same issue, but we encountered this in rust-sfml.

The normal commented out code gets changed to doc comments.

 /// Shapes implementations using reference counting to manage shared resources
-// pub mod rc {
-//     pub use graphics::circle_shape::rc::CircleShape;
-//     pub use graphics::rectangle_shape::rc::RectangleShape;
-//     pub use graphics::convex_shape::rc::{ConvexShape, ConvexShapePoints};
-//     pub use graphics::shape::rc::Shape;
-//     pub use graphics::shader::rc::Shader;
-//     pub use graphics::text::rc::Text;
-//     pub use graphics::sprite::rc::Sprite;
-//     pub use graphics::render_states::rc::RenderStates;
-// }
+/// pub mod rc {
+///     pub use graphics::circle_shape::rc::CircleShape;
+///     pub use graphics::rectangle_shape::rc::RectangleShape;
+///     pub use graphics::convex_shape::rc::{ConvexShape, ConvexShapePoints};
+///     pub use graphics::shape::rc::Shape;
+///     pub use graphics::shader::rc::Shader;
+///     pub use graphics::text::rc::Text;
+///     pub use graphics::sprite::rc::Sprite;
+///     pub use graphics::render_states::rc::RenderStates;
+/// }

EDIT: This issue does not seem to appear using the rustfmt master branch.

@srinivasreddy
Copy link
Contributor

As said in #1094 I am taking this. Thanks @nrc

@nrc nrc added only-with-option requires a non-default option value to reproduce and removed only-with-option requires a non-default option value to reproduce labels Jan 16, 2017
@nrc nrc closed this as completed in 0218a41 Jan 16, 2017
@topecongiro
Copy link
Contributor

This issue still get reproduced when normalize_comments = true.

@topecongiro topecongiro reopened this May 28, 2017
@topecongiro topecongiro added the only-with-option requires a non-default option value to reproduce label May 28, 2017
@nrc nrc closed this as completed in #1607 May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments bug Panic, non-idempotency, invalid code, etc. only-with-option requires a non-default option value to reproduce
Projects
None yet
Development

No branches or pull requests

5 participants