]> git.lizzy.rs Git - rust.git/commitdiff
Add a test for #2523
authortopecongiro <seuchida@gmail.com>
Fri, 9 Mar 2018 08:09:56 +0000 (17:09 +0900)
committertopecongiro <seuchida@gmail.com>
Fri, 9 Mar 2018 08:09:56 +0000 (17:09 +0900)
tests/source/issue-2523.rs [new file with mode: 0644]
tests/target/issue-2523.rs [new file with mode: 0644]

diff --git a/tests/source/issue-2523.rs b/tests/source/issue-2523.rs
new file mode 100644 (file)
index 0000000..693d06e
--- /dev/null
@@ -0,0 +1,17 @@
+// rustfmt-normalize_comments: true
+
+// Do not unindent macro calls in comment with unformattable syntax.
+//! ```rust
+//! let x = 3  ;
+//! some_macro!(pub fn fn foo() (
+//!     println!("Don't unindent me!");
+//! ));
+//! ```
+
+// Format items that appear as arguments of macro call.
+//! ```rust
+//! let x = 3  ;
+//! some_macro!(pub fn foo() {
+//! println!("Don't unindent me!");
+//! });
+//! ```
diff --git a/tests/target/issue-2523.rs b/tests/target/issue-2523.rs
new file mode 100644 (file)
index 0000000..6805f7e
--- /dev/null
@@ -0,0 +1,17 @@
+// rustfmt-normalize_comments: true
+
+// Do not unindent macro calls in comment with unformattable syntax.
+//! ```rust
+//! let x = 3;
+//! some_macro!(pub fn fn foo() (
+//!     println!("Don't unindent me!");
+//! ));
+//! ```
+
+// Format items that appear as arguments of macro call.
+//! ```rust
+//! let x = 3;
+//! some_macro!(pub fn foo() {
+//!     println!("Don't unindent me!");
+//! });
+//! ```