about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-03-30 12:36:28 -0700
committerGitHub <noreply@github.com>2020-03-30 12:36:28 -0700
commit5ca3d023ff6c970e7dcd6cee3c83672dff14dc15 (patch)
tree2cc8d28e47d2d970c06829e3a5eb01ed48bde0ea /tests
parent9f53665f91be16c9aa7afd83f7c79357fec9152b (diff)
parent9714a140c99a8968b0becb5cf9227b1787768088 (diff)
Merge pull request #4100 from calebcartwright/rustfmt1x-rustc-v650
bump rustfmt 1x to rustc-ap v651
Diffstat (limited to 'tests')
-rw-r--r--tests/source/imports.rs16
-rw-r--r--tests/source/issue_4057.rs15
-rw-r--r--tests/target/imports.rs10
-rw-r--r--tests/target/issue-4068.rs3
-rw-r--r--tests/target/issue_4057.rs15
5 files changed, 46 insertions, 13 deletions
diff --git a/tests/source/imports.rs b/tests/source/imports.rs
index d0bdeda595d..4dfc6ed94e3 100644
--- a/tests/source/imports.rs
+++ b/tests/source/imports.rs
@@ -3,7 +3,7 @@
 // Imports.
 
 // Long import.
-use syntax::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, ItemDefaultImpl};
+use rustc_ast::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, ItemDefaultImpl};
 use exceedingly::looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::path::{ItemA, ItemB};
 use exceedingly::loooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::path::{ItemA, ItemB};
 
@@ -15,30 +15,30 @@ use list::{
 
 use test::{  Other          /* C   */  , /*   A   */ self  /*    B     */    };
 
-use syntax::{self};
+use rustc_ast::{self};
 use {/* Pre-comment! */
      Foo, Bar /* comment */};
 use Foo::{Bar, Baz};
-pub use syntax::ast::{Expr_, Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath};
+pub use rustc_ast::ast::{Expr_, Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath};
 
-use syntax::some::{};
+use rustc_ast::some::{};
 
 use self;
 use std::io::{self};
 use std::io::self;
 
 mod Foo {
-    pub use syntax::ast::{
+    pub use rustc_ast::ast::{
         ItemForeignMod,
-        ItemImpl, 
+        ItemImpl,
         ItemMac,
         ItemMod,
-        ItemStatic, 
+        ItemStatic,
         ItemDefaultImpl
     };
 
     mod Foo2 {
-        pub use syntax::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, self, ItemDefaultImpl};
+        pub use rustc_ast::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, self, ItemDefaultImpl};
     }
 }
 
diff --git a/tests/source/issue_4057.rs b/tests/source/issue_4057.rs
new file mode 100644
index 00000000000..7cd80734bd9
--- /dev/null
+++ b/tests/source/issue_4057.rs
@@ -0,0 +1,15 @@
+// rustfmt-format_code_in_doc_comments: true
+
+/// ```
+/// # #[rustversion::since(1.36)]
+/// # fn dox() {
+/// # use std::pin::Pin;
+/// # type Projection<'a> = &'a ();
+/// # type ProjectionRef<'a> = &'a ();
+/// # trait Dox {
+/// fn   project_ex (self: Pin<&mut Self>) -> Projection<'_>;
+/// fn   project_ref(self: Pin<&Self>) -> ProjectionRef<'_>;
+/// # }
+/// # }
+/// ```
+struct Foo;
diff --git a/tests/target/imports.rs b/tests/target/imports.rs
index c497a375b59..87584d89f66 100644
--- a/tests/target/imports.rs
+++ b/tests/target/imports.rs
@@ -9,7 +9,7 @@ use exceedingly::loooooooooooooooooooooooooooooooooooooooooooooooooooooooong::im
 use exceedingly::looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::path::{
     ItemA, ItemB,
 };
-use syntax::ast::{ItemDefaultImpl, ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic};
+use rustc_ast::ast::{ItemDefaultImpl, ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic};
 
 use list::{
     // Another item
@@ -22,8 +22,8 @@ use list::{
 
 use test::{/* A */ self /* B */, Other /* C */};
 
-pub use syntax::ast::{Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath, Expr_};
-use syntax::{self};
+pub use rustc_ast::ast::{Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath, Expr_};
+use rustc_ast::{self};
 use Foo::{Bar, Baz};
 use {Bar /* comment */, /* Pre-comment! */ Foo};
 
@@ -31,12 +31,12 @@ use std::io;
 use std::io::{self};
 
 mod Foo {
-    pub use syntax::ast::{
+    pub use rustc_ast::ast::{
         ItemDefaultImpl, ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic,
     };
 
     mod Foo2 {
-        pub use syntax::ast::{
+        pub use rustc_ast::ast::{
             self, ItemDefaultImpl, ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic,
         };
     }
diff --git a/tests/target/issue-4068.rs b/tests/target/issue-4068.rs
new file mode 100644
index 00000000000..cd8a1f2765f
--- /dev/null
+++ b/tests/target/issue-4068.rs
@@ -0,0 +1,3 @@
+fn main() {
+    extern "C" fn packet_records_options_impl_layout_length_encoding_option_len_multiplier();
+}
diff --git a/tests/target/issue_4057.rs b/tests/target/issue_4057.rs
new file mode 100644
index 00000000000..467e67bca7c
--- /dev/null
+++ b/tests/target/issue_4057.rs
@@ -0,0 +1,15 @@
+// rustfmt-format_code_in_doc_comments: true
+
+/// ```
+/// # #[rustversion::since(1.36)]
+/// # fn dox() {
+/// # use std::pin::Pin;
+/// # type Projection<'a> = &'a ();
+/// # type ProjectionRef<'a> = &'a ();
+/// # trait Dox {
+/// fn project_ex(self: Pin<&mut Self>) -> Projection<'_>;
+/// fn project_ref(self: Pin<&Self>) -> ProjectionRef<'_>;
+/// # }
+/// # }
+/// ```
+struct Foo;