// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use Shape;
+use {Indent, Shape};
use comment::{rewrite_comment, CodeCharKind, CommentCodeSlices};
use config::WriteMode;
use syntax::codemap::{BytePos, Pos, Span};
self.config.comment_width(),
self.config.max_width() - self.block_indent.width(),
);
+ let comment_indent = Indent::from_width(self.config, self.buffer.cur_offset());
self.buffer.push_str(&rewrite_comment(
subslice,
false,
- Shape::legacy(comment_width, self.block_indent),
+ Shape::legacy(comment_width, comment_indent),
self.config,
).unwrap());
// comment
// comment2
- // FIXME(1275)
code(); // leave this comment alone!
- // ok?
+ // ok?
// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a
// diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam
// .unwrap());
funk(); // dontchangeme
- // or me
+ // or me
// #1388
const EXCEPTION_PATHS: &'static [&'static str] = &[
// comment
// comment2
- // FIXME(1275)
code(); /* leave this comment alone!
- * ok? */
+ * ok? */
/* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a
* diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam
// .unwrap());
funk(); //dontchangeme
- // or me
+ // or me
}
/// test123