about summary refs log tree commit diff
path: root/src/tools/rustfmt/tests/source
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/source')
-rw-r--r--src/tools/rustfmt/tests/source/unsafe-binders.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/unsafe-binders.rs b/src/tools/rustfmt/tests/source/unsafe-binders.rs
new file mode 100644
index 00000000000..ccf7c8bb9af
--- /dev/null
+++ b/src/tools/rustfmt/tests/source/unsafe-binders.rs
@@ -0,0 +1,11 @@
+fn foo() -> unsafe<'a>
+&'a () {}
+
+struct Foo {
+    x: unsafe<'a>
+&'a (),
+}
+
+struct Bar(unsafe<'a> &'a ());
+
+impl Trait for unsafe<'a> &'a () {}